Esempio n. 1
0
void PlayerData::BuildBasicData(Store db)
{
    BuildBasePropData        (db);
    BuildScenePropsData      (db);
    BuildCardData            (db);
    BuildCardRosterData      (db);

    BuildEquipPkgData        (db);
    BuildOfficerData         (db);
    BuildPersonalMailData    (db);
    BuildArenaTable          (db);

    BuildCashPropsData       (db);
    BuildManorPropsData      (db);
    BuildEventData           (db);

    BuildQuestData           (db);
    BuildWorshipData         (db);
    BuildWorldBossData       (db);
    BuildDialData            (db);

    BuildVipTable            (db);
    BuildDataType            (db, PlayerDataType_End);
    DBLOG;
}
Esempio n. 2
0
void PlayerData::BuildDungeonProgressData(Store db)
{
    BuildDataType            (db, PlayerDataType_Dungeon);
    db << dungeonProgress;
    DEBUG_LOG("打包玩家关卡进度 bigLv %u smallLv %u\n",
              dungeonProgress.bigLv, dungeonProgress.smallLv);
}
Esempio n. 3
0
void PlayerData::BuildRandShopTable(Store db)
{
    BuildDataType            (db, PlayerDataType_RandShopItem);
    MAP_RANDSHOP::iterator it  = m_randShop.begin();
    MAP_RANDSHOP::iterator end = m_randShop.end();
    
    uint32 ShopSize = m_randShop.size();
    db << ShopSize;
    
    while (it != end)
    {
        db << it->first;
        uint32 count = it->second.size();
        db << count;
        MAP_RANDITEM::iterator item_it  = it->second.begin();
        MAP_RANDITEM::iterator item_end = it->second.end();

        while (item_it != item_end)
        {
            db << item_it->first
                        << item_it->second;
            ++item_it;
        }
        ++it;
    }
}
Esempio n. 4
0
void PlayerData::BuildExtendData(Store db)
{
    BuildSundryPkgData       (db);
    BuildGemPkgData          (db);
    BuildCardChipsPkgData    (db);
    BuildEquipChipsPkgData   (db);
    
    BuildLotteryPropsData    (db);
    BuildDungeonProgressData (db);
    BuildSceneRewardData     (db);
    BuildSceneStateTable     (db);

    BuildRandShopPropsData   (db);
    BuildRandShopTable       (db);
    BuildNormalShopTable     (db);
    
    BuildDaySignTable        (db);
    BuildBabelTable          (db);

    BuildHuntingData         (db);
    BuildDrawCardData        (db);

    BuildMartData            (db);

    BuildTreasureData        (db);

//    BuildSceneScoreTable     (db);
    BuildDataType            (db, PlayerDataType_End);
    
    int verify = 123456;
    db << verify;
}
Esempio n. 5
0
void PlayerData::BuildTreasureData(Store db)
{
    if (mTreasureData.empty())
        return;

    BuildDataType            (db, PlayerDataType_Treasure);
    db.append(mTreasureData.data(), mTreasureData.size());
}
Esempio n. 6
0
void PlayerData::BuildEventData(Store db)
{
    if (mEventData.empty())
        return;

    BuildDataType            (db, PlayerDataType_Event);
    db.append(mEventData.data(), mEventData.size());
}
Esempio n. 7
0
void PlayerData::BuildActivityData(Store db)
{
    if (mActivityData.empty())
        return;

    BuildDataType            (db, PlayerDataType_Activity);
    db.append(mActivityData.data(), mActivityData.size());
}
Esempio n. 8
0
void PlayerData::BuildDialData(Store db)
{
    if(mDialData.empty())
        return;

    BuildDataType            (db, PlayerDataType_Dial);
    db.append(mDialData.data(), mDialData.size());
}
Esempio n. 9
0
void PlayerData::BuildEquipChipsPkgData(Store db)
{
    BuildDataType            (db, PlayerDataType_EquipChips);
    db << static_cast<int>(m_pkgEquipChips.size());
    for (const auto& p : m_pkgEquipChips)
    {
        db << p.first << p.second;
    }
}
Esempio n. 10
0
void PlayerData::BuildGemPkgData(Store db)
{
    BuildDataType            (db, PlayerDataType_Gem);
    db << static_cast<int>(m_pkgGem.size());
    for (const auto& p : m_pkgGem)
    {
        db << p.first << p.second;
    }
}
Esempio n. 11
0
void PlayerData::BuildSundryPkgData(Store db)
{
    BuildDataType            (db, PlayerDataType_Sundry);
    db << static_cast<int>(m_pkgSundry.size());
    for (const auto& p : m_pkgSundry)
    {
        db << p.first << p.second;
    }
}
Esempio n. 12
0
void PlayerData::BuildCardData(Store db)
{
    BuildDataType            (db, PlayerDataType_Card);
	uint16 count = m_cardMap.size();
	db << count;
    for (const auto& p : m_cardMap)
    {
        db << p.second;
    }
}
Esempio n. 13
0
void PlayerData::BuildEquipPkgData(Store db)
{
    BuildDataType            (db, PlayerDataType_Equip);
    int count = m_pkgEquip.size();
    db << count;
    for (const auto& p : m_pkgEquip)
    {
        db << p.first << p.second;
    }
}
Esempio n. 14
0
void PlayerData::BuildSceneRewardData(Store db)
{
    BuildDataType            (db,PlayerDataType_SceneReward);
    uint16 sz = m_sceneReward.size();
    db << sz;
    MAP_SCENEREWARD::iterator it = m_sceneReward.begin();
    for (; it != m_sceneReward.end(); ++it)
    {
        db << it->first << it->second;
    }
}
Esempio n. 15
0
void PlayerData::BuildLotteryPropsData(Store db)
{
    BuildDataType            (db, PlayerDataType_Lottery);
    uint16 sz = m_lottery.size();
    db << sz;
    MAP_LOTTERYPROPS::iterator it = m_lottery.begin();
    for (; it != m_lottery.end(); ++it)
    {
        db << it->second;
    }
}
Esempio n. 16
0
void PlayerData::BuildNormalShopTable(Store db)
{
    BuildDataType            (db, PlayerDataType_NormalShop);
    uint32 count = m_normalShop.size();
    db << count;
    MAP_NORMALSHOP::iterator it = m_normalShop.begin();
    for (; it != m_normalShop.end(); ++it)
    {
        db << it->first << it->second;
    }
}
Esempio n. 17
0
void PlayerData::BuildCardRosterData(Store db)
{
    BuildDataType            (db, PlayerDataType_Roster);
    int c = m_cardRoster.size();
    db << c;

    for (const auto x : m_cardRoster)
    {
        db << x.first;
    }
}
Esempio n. 18
0
void PlayerData::BuildHuntingData(Store db)
{
    BuildDataType            (db, PlayerDataType_HuntingData);
    db << huntingProps.stayPos << huntingProps.remainTimes << huntingProps.buyTimes << huntingProps.restoreTime;
    for(uint8 i=0; i<3; ++i)
	{
        db << huntingProps.missions[i].missionType;
        db << huntingProps.missions[i].require;
        db << huntingProps.missions[i].value;
        db << huntingProps.missions[i].rewarded;
    }
}
Esempio n. 19
0
void PlayerData::BuildSceneStateTable(Store db)
{
    BuildDataType            (db, PlayerDataType_SceneState);
    uint16 sz = m_sceneState.size();

    db << sz;
    MAP_SCENESTATE::iterator it = m_sceneState.begin();
    for (; it != m_sceneState.end(); ++it)
    {
        db << it->first << it->second;
    }
}
Esempio n. 20
0
void PlayerData::BuildDrawCardData(Store db)
{
    BuildDataType            (db, PlayerDataType_DrawCardData);
    db << drawCardProps.remainTimes;
    for(uint8 i=0; i<6; ++i)
	{
		db << drawCardProps.cards[i].prob;
		db << drawCardProps.cards[i].itemType;
		db << drawCardProps.cards[i].itemId;
		db << drawCardProps.cards[i].itemCount;
		db << drawCardProps.cards[i].itemPos;
		db << drawCardProps.cards[i].gained;
    }
}
Esempio n. 21
0
void PlayerData::BuildMartData(Store db)
{
    if (martMap.empty())
        return;

    BuildDataType            (db, PlayerDataType_Mart);
	uint32 count = martMap.size();
	db << count;

	for (MapUint_Uint::iterator it = martMap.begin(); it != martMap.end(); ++it)
	{
		db << it->first;
		db << it->second;
	}
}
Esempio n. 22
0
void PlayerData::BuildQuestData(Store db)
{
    BuildDataType            (db, PlayerDataType_Quest);
    int sz = 0;
    if (getId() == 105101)
    {
        int i = 1;
        i += 1;
    }
    sz = questStatus.size();
    db << sz;

    for (const auto& qv : questStatus)
    {
        db << qv.first << qv.second.value << qv.second.status;
    }
}
Esempio n. 23
0
void PlayerData::BuildPersonalMailData(Store db)
{
    BuildDataType            (db, PlayerDataType_Mail);
    int sz = m_personalMail.size();
    
    db << sz;
    
    MAP_PERSONAL_MAIL::iterator it  = m_personalMail.begin();
    MAP_PERSONAL_MAIL::iterator end = m_personalMail.end();

    while (it != end)
    {
        db << it->second;
        ++it;
    }

    db << mailProps;
}
Esempio n. 24
0
void PlayerData::BuildWorshipData(Store db)
{
    BuildDataType            (db, PlayerDataType_Worship);
    db << worshipProps;
}
HRESULT CDBIContext::BuildArrayType (CString strRangeList, const CString &strNamespace, CString strText, const CString &strDBIFile, CTypeDBI *&pType)
{
    HRESULT hr;
    CComObject<CTypeDBI> *pTypeDBI;
    CTypeDBI *pElementType;
    int iPos;
    long lLowerBound;
    long lUpperBound;
    CString strRange;
    CString strBound;
    LPTSTR pszEnd;
    int iIndex;

    pType = NULL;

    iPos = strRangeList.Find (_T (','));
    if (iPos == -1)
    {
        strRange = strRangeList;
        strRangeList = "";
    }
    else
    {
        strRange = strRangeList.Left (iPos);
        strRangeList = strRangeList.Mid (iPos + 1);
    };

    iPos = strRange.Find (_T ('.'));
    ASSERT (iPos != -1 && iPos + 1 < strRange.GetLength () && strRange[iPos + 1] == _T ('.'));
    if (iPos == -1 || iPos + 1 >= strRange.GetLength () || strRange[iPos + 1] != _T ('.'))
    {
        return (E_UNEXPECTED);
    };

    strBound = strRange.Left (iPos);
    strBound.TrimLeft ();
    strBound.TrimRight ();
    lLowerBound = _tcstol (strBound, &pszEnd, 10);
    ASSERT (pszEnd == NULL || *pszEnd == _T ('\0'));
    if (pszEnd != NULL && *pszEnd != _T ('\0'))
    {
        return (E_UNEXPECTED);
    };

    strBound = strRange.Mid (iPos + 2);
    strBound.TrimLeft ();
    strBound.TrimRight ();
    lUpperBound = _tcstol (strBound, &pszEnd, 10);
    ASSERT (pszEnd == NULL || *pszEnd == _T ('\0'));
    if (pszEnd != NULL && *pszEnd != _T ('\0'))
    {
        return (E_UNEXPECTED);
    };

    strRangeList.TrimLeft ();
    if (!strRangeList.IsEmpty ())
    {
        hr = BuildArrayType (strRangeList, strNamespace, strText, strDBIFile, pElementType);
    }
    else
    {
        strText.TrimLeft ();
        ASSERT (strText.Left (2).CompareNoCase (_T ("OF")) == 0 && _istspace (strText[2]));
        if (strText.Left (2).CompareNoCase (_T ("OF")) != 0 || !_istspace (strText[2]))
        {
            return (E_UNEXPECTED);
        };

        hr = BuildDataType (strText.Mid (3), "<POUS>", strDBIFile, pElementType);
    };
    if (FAILED (hr))
    {
        return (hr);
    };
    ASSERT (pElementType != NULL);
    if (pElementType == NULL)
    {
        return (E_UNEXPECTED);
    };

    for (iIndex = 0; iIndex < m_UserTypes.GetSize (); ++iIndex)
    {
        CTypeDBI *pUserType;

        pUserType = m_UserTypes[iIndex];
        ASSERT (pUserType != NULL);
        if (pUserType == NULL)
        {
            pElementType->Release ();
            return (E_UNEXPECTED);
        };

        if (!pUserType->GetTypeName ().IsEmpty () ||
            pUserType->GetKind () != DBIArrayType)
            continue;

        if (pElementType == pUserType->GetElementType () &&
            lLowerBound == pUserType->GetLowerBound () &&
            lUpperBound == pUserType->GetUpperBound ())
        {
            pType = pUserType;
            pType->AddRef ();
            return (S_OK);
        };
    };

    hr = CComObject<CTypeDBI>::CreateInstance (&pTypeDBI);
    if (FAILED (hr))
    {
        pElementType->Release ();
        return (hr);
    };
    ASSERT (pTypeDBI != NULL);
    if (pTypeDBI == NULL)
    {
        pElementType->Release ();
        return (E_UNEXPECTED);
    };
    pTypeDBI->AddRef ();

    hr = pTypeDBI->Init (this, pElementType, lLowerBound, lUpperBound);
    if (FAILED (hr))
    {
        pElementType->Release ();
        pTypeDBI->Release ();
        return (hr);
    };

    m_UserTypes.Add (pTypeDBI);

    pType = pTypeDBI;
    return (S_OK);
}
Esempio n. 26
0
void PlayerData::BuildOfficerData(Store db)
{
    BuildDataType            (db, PlayerDataType_Officer);
    db << officerProps;
}
Esempio n. 27
0
void PlayerData::BuildWorldBossData(Store db)
{
    BuildDataType            (db, PlayerDataType_WorldBoss);
    db << bossProps;
}
Esempio n. 28
0
void PlayerData::BuildCashPropsData(Store db)
{
    BuildDataType            (db, PlayerDataType_CashProps);
    db << cashProps;
}
Esempio n. 29
0
void PlayerData::BuildManorPropsData(Store db)
{
    BuildDataType            (db, PlayerDataType_ManorProps);
    db << manorProps;
}
Esempio n. 30
0
void PlayerData::BuildRandShopPropsData(Store db)
{
    BuildDataType            (db, PlayerDataType_RandShop);
    db << RandProps;
}