Exemplo n.º 1
0
void PetExchangeInfo::LoadInfoFromFile(CFileStream &rFileStream)
{
    if (!rFileStream.IsOpen() )
        return;

    unsigned char nAttributeType = 0;
    unsigned char nQualityType = 0;
    unsigned int nItemType = 0;
    unsigned short nItemCount = 0;
    unsigned short nCount = 0;

    rFileStream.ReadUShort(nCount);

    for (unsigned short i = 0; i < nCount; ++i)
    {
        rFileStream.ReadUChar(nAttributeType);
        rFileStream.ReadUChar(nQualityType);
        rFileStream.ReadUInt(nItemType);
        rFileStream.ReadUShort(nItemCount);

        ASSERT(ePetAttributeType_None < nAttributeType && nAttributeType < ePetAttributeType_Max);
        ASSERT(ePetQualityType_None < nQualityType && nQualityType < ePetQualityType_Max);
        ASSERT(nItemType > 0);
        ASSERT(nItemCount > 0);

        CItem item(nItemType, nItemCount, -1, false);

        AddExchangeInfo(nAttributeType, nQualityType, item);
    }
}
Exemplo n.º 2
0
void CLuckDrawPrizeBase::LoadFromFile(CFileStream &file)
{
    // Factory loads m_nType outside.
    file.ReadUChar(m_nLevel);
    file.ReadUChar(m_nSexNeed);
    file.ReadBool(m_bAnnounce);

    ASSERT(m_nType < ELuckDrawPrizeType_Max);
    ASSERT(m_nLevel < ELuckDrawPrizeLevel_Max);
    ASSERT(m_nSexNeed < ESexType_Max);
}
Exemplo n.º 3
0
bool BigMamaStageInfo::Load(CFileStream & fs)
{
    fs.ReadUShort(m_nStageID);
    fs.ReadUShort(m_nMusicID);
    fs.ReadUChar(m_nModeID);
    fs.ReadUChar(m_nLevel);
    fs.ReadUChar(m_nNpcID);
    fs.ReadUInt(m_nTargetScore);
    fs.ReadUChar(m_nSceneID);
    fs.ReadUInt(m_nRatio);

    return true;
}
Exemplo n.º 4
0
bool BigMamaExchange::Load(CFileStream & fs)
{
    fs.ReadUChar(m_nSex);
    fs.ReadUInt(m_nTargetItemID);
    fs.ReadInt(m_nTargetMatune);
    fs.ReadUInt(m_nTargetCount);

    fs.ReadUInt(m_nM1ItemID);
    fs.ReadInt(m_nM1Matune);
    fs.ReadUInt(m_nM1Count);

    fs.ReadUInt(m_nM2ItemID);
    fs.ReadInt(m_nM2Matune);
    fs.ReadUInt(m_nM2Count);

    fs.ReadUInt(m_nM3ItemID);
    fs.ReadInt(m_nM3Matune);
    fs.ReadUInt(m_nM3Count);

    fs.ReadUInt(m_nDanceGroupContibute);

    fs.ReadUInt(m_nMoneyCount);
    fs.ReadUInt(m_nBindMCoinCount);
    fs.ReadUInt(m_nMCoinCount);

    return true;
}
Exemplo n.º 5
0
bool BigMamaBossConfig::Load(CFileStream &file)
{
    unsigned char temp = 0; // ûÓõÄ×Ö¶Î
    unsigned char cBossId = 0;
    file.ReadUChar(cBossId);
    m_nBossID = cBossId;

    unsigned short nNameLength = 0;
    file.ReadUShort(nNameLength);
    file.ReadString(m_strName, nNameLength);

    file.ReadUChar(temp); // story ID.

    file.ReadUChar(m_cSex);

    unsigned int cColor = 0;
    file.ReadUInt(cColor);
    m_cSKinColor = cColor;

    itemtype_t nItemType = 0;
    file.ReadUInt(nItemType);
    m_Equips[eItemClothType_Hair] = nItemType;

    file.ReadUInt(nItemType);
    m_Equips[eItemClothType_Face] = nItemType;

    file.ReadUInt(nItemType);
    m_Equips[eItemClothType_Body] = nItemType;

    file.ReadUInt(nItemType);
    m_Equips[eItemClothType_Glove] = nItemType;

    file.ReadUInt(nItemType);
    m_Equips[eItemClothType_Leg] = nItemType;

    file.ReadUInt(nItemType);
    m_Equips[eItemClothType_Cap] = nItemType;

    file.ReadUInt(nItemType);
    m_Equips[eItemClothType_FacialContent] = nItemType;

    file.ReadUInt(nItemType);
    m_Equips[eItemClothType_Shoulder] = nItemType;

    file.ReadUInt(nItemType);
    m_Equips[eItemClothType_Wing] = nItemType;

    file.ReadUInt(nItemType);
    m_Equips[eItemClothType_LeftHand] = nItemType;

    file.ReadUInt(nItemType);
    m_Equips[eItemClothType_RightHand] = nItemType;

    file.ReadUInt(nItemType);
    m_Equips[eItemClothType_Wrist] = nItemType;

    file.ReadUInt(nItemType);
    m_Equips[eItemClothType_Hip] = nItemType;

    file.ReadUInt(nItemType);
    m_Equips[eItemClothType_Sock] = nItemType;

    file.ReadUInt(nItemType);
    m_Equips[eItemClothType_Feet] = nItemType;

    file.ReadUInt(nItemType);
    m_Equips[eItemClothType_All] = nItemType;

    return true;

}