Exemple #1
0
bool CStoryConfig::Load(CFileStream&file)
{
    file.ReadUInt( m_nStoryID );

    unsigned short nNPCListCount = 0;
    file.ReadUShort( nNPCListCount );
    for ( unsigned int i  = 0 ;i <  nNPCListCount; ++i )
    {
        unsigned int nNPCID = 0;
        file.ReadUInt( nNPCID );
        m_NPCList.push_back( nNPCID );
    }

    unsigned short nContentCount = 0;
    file.ReadUShort( nContentCount );
    for ( unsigned int i  = 0 ;i <  nContentCount; ++i )
    {
        CStoryContent content;
        file.ReadUInt( content.m_nNPCID );

        short nCount = 0;
        file.ReadShort(nCount) ;
        file.ReadString(content.m_strContent, nCount);

        m_ContentList.push_back( content );
    }

    return true;
}
Exemple #2
0
bool CTargetConfig::Load(CFileStream&file)
{
    file.ReadUInt( m_nTargetID );

    short nCount = 0;
    file.ReadShort(nCount) ;
    file.ReadString(m_strDesc, nCount);

    file.ReadUInt( m_nFlag );

    nCount = 0;
    file.ReadShort(nCount) ;
    file.ReadString(m_strValue, nCount);

    unsigned short nStarValueCount = 0;
    file.ReadUShort(nStarValueCount);
    for (unsigned short i = 0 ; i < nStarValueCount; ++i)
    {
        unsigned short nStarCount = 0;
        unsigned int nStarValue = 0;

        file.ReadUShort(nStarCount);
        file.ReadUInt(nStarValue);

        m_mapStarValue[nStarCount] = nStarValue;
    }

    return true;
}
Exemple #3
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);
    }
}
Exemple #4
0
bool CRubbishDropConfig::Load(CFileStream&file)
{
    file.ReadUInt( m_nRubbishDropID );

    unsigned short nNum = 0;
    file.ReadUShort( nNum );
    for ( unsigned short i = 0; i < nNum; ++i )
    {
        CDropItemInfo info;
        file.ReadUInt(info.m_itemInfo.m_nItemType);
        file.ReadUShort(info.m_itemInfo.m_nItemCount);
        file.ReadInt(info.m_itemInfo.m_nValidTime);
        file.ReadUInt(info.m_nRate);

        m_MaleDrop.push_back( info );
    }

    file.ReadUShort( nNum );
    for ( unsigned short i = 0; i < nNum; ++i )
    {
        CDropItemInfo info;
        file.ReadUInt(info.m_itemInfo.m_nItemType);
        file.ReadUShort(info.m_itemInfo.m_nItemCount);
        file.ReadInt(info.m_itemInfo.m_nValidTime);
        file.ReadUInt(info.m_nRate);

        m_FemaleDrop.push_back( info );
    }

    return true;
}
Exemple #5
0
bool CParcloseConfig::Load(CFileStream&file)
{
    file.ReadUInt( m_nParcloseID );

    short nCount = 0;
    file.ReadShort(nCount) ;
    file.ReadString(m_strParcloseName, nCount);
    file.ReadUInt(m_nBeginStoryID);
    file.ReadUInt(m_nEndStoryID);
    file.ReadUInt(m_nCostCrystal);
    file.ReadUInt(m_nSceneID);
    file.ReadUInt(m_nMusicID);
    file.ReadShort(nCount) ;
    file.ReadString(m_strMusicName, nCount);
    file.ReadUInt(m_nMusicMode);
    file.ReadUInt(m_nMusicLevel);
    file.ReadFloat(m_fPosX);
    file.ReadFloat(m_fPosY);

    unsigned short nTargetCount = 0;
    file.ReadUShort( nTargetCount );
    for ( unsigned int i  = 0 ;i <  nTargetCount; ++i )
    {
        unsigned int nTargetID = 0;
        file.ReadUInt( nTargetID );
        m_Targets.push_back( nTargetID );
    }

    unsigned short nBossCount = 0;
    file.ReadUShort( nBossCount );
    for ( unsigned int i  = 0 ;i <  nBossCount; ++i )
    {
        unsigned int nBossID = 0;
        file.ReadUInt( nBossID );
        m_BossIDList.push_back( nBossID );
    }

    unsigned short nBossScoreCount = 0;
    file.ReadUShort( nBossScoreCount );
    for ( unsigned int i  = 0 ;i <  nBossScoreCount; ++i )
    {
        CBossScoreRange range;
        file.ReadUInt( range.m_nMinScore );
        file.ReadUInt( range.m_nMaxScore );
        m_BossScoreList.push_back( range );
    }

    file.ReadUInt(m_nDailyQuickFinishNum);
    return true;
}
Exemple #6
0
bool CDungeonConfig::Load(CFileStream&file)
{
    file.ReadUInt( m_nDungeonID );

    short nCount = 0;
    file.ReadShort(nCount) ;
    file.ReadString(m_strDungeonName, nCount);

    file.ReadShort(nCount) ;
    file.ReadString(m_strIconName, nCount);

    file.ReadShort(nCount) ;
    file.ReadString(m_strIconAtlas, nCount);

    file.ReadUInt(m_nStoryID);
    unsigned short nParcloseCount = 0;
    file.ReadUShort( nParcloseCount );
    for ( unsigned int i  = 0 ;i <  nParcloseCount; ++i )
    {
        unsigned int nParcloseID = 0;
        file.ReadUInt( nParcloseID );
        m_ParcloseList.push_back( nParcloseID );
    }

    return true;
}
Exemple #7
0
bool CDebrisConfig::Load(CFileStream&file)
{
    file.ReadUInt( m_nDebrisID );

    short nCount = 0;
    file.ReadShort(nCount) ;
    file.ReadString(m_strName, nCount);

    file.ReadShort(nCount) ;
    file.ReadString(m_strIconName, nCount);

    file.ReadShort(nCount) ;
    file.ReadString(m_strAtlasName, nCount);

    file.ReadUInt( m_nNeedNum );
    file.ReadUInt( m_nCurrencyType );
    file.ReadUInt( m_nCurrencyCount );

    unsigned short nMaleItemCount = 0;
    file.ReadUShort( nMaleItemCount );
    for ( unsigned short i = 0; i < nMaleItemCount; ++i )
    {
        CItem item;
        file.ReadUInt( item.m_nItemType );
        file.ReadUShort( item.m_nItemCount );
        file.ReadInt( item.m_nValidTime );

        m_MaleExchangeItem.push_back( item );
    }

    unsigned short nFemaleItemCount = 0;
    file.ReadUShort( nFemaleItemCount );
    for ( unsigned short i = 0; i < nFemaleItemCount; ++i )
    {
        CItem item;
        file.ReadUInt( item.m_nItemType );
        file.ReadUShort( item.m_nItemCount );
        file.ReadInt( item.m_nValidTime );

        m_FemaleExchangeItem.push_back( item );
    }

    return true;
}
bool AuctionGoodsInfo::LoadFromFile(CFileStream &file)
{
    if (!m_cGoodsInfo.LoadFromFile(file))
        return false;

    file.ReadUShort(m_uSerializeID);
    file.ReadUShort(m_uAddPercent);
    file.ReadUInt(m_uMinAdd);
    file.ReadFloat(m_fCountDown);
    file.ReadUInt(m_uCurPrice);
    file.ReadUInt(m_uRoleID);
    file.ReadString2(m_strRoleName);

    ASSERT(0 < m_uSerializeID);
    ASSERT(m_uAddPercent <= 100);

    if (0 == m_uCurPrice)
        m_uCurPrice = m_cGoodsInfo.m_uSellPrice;

    return true;
}
Exemple #9
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;
}
Exemple #10
0
void CMedalCfgMgr::LoadProgressConfigFromFile( CFileStream &rFileStream )
{
    if ( !rFileStream.IsOpen() )
        return;

    m_mapMedalProgressCfg.clear();

    unsigned short nCount = 0;
    rFileStream.ReadUShort( nCount );

    for ( unsigned short i = 0; i < nCount; ++i )
    {
        CMedalProgressCfg processInfo;

        if ( processInfo.LoadInfoFromFile( rFileStream ) )
        {
            m_mapMedalProgressCfg.insert( std::make_pair( processInfo.GetId(), processInfo ) );
        }
    }
}
Exemple #11
0
bool CMainlineDropConfig::Load(CFileStream&file)
{
    file.ReadUInt( m_nParcloseID );
    file.ReadUInt( m_nMustDropNum );

    unsigned short nNum = 0;
    file.ReadUShort( nNum );
    for ( unsigned short i = 0; i < nNum; ++i )
    {
        CDropItemInfo info;
        file.ReadUInt(info.m_itemInfo.m_nItemType);
        file.ReadUShort(info.m_itemInfo.m_nItemCount);
        file.ReadInt(info.m_itemInfo.m_nValidTime);
        file.ReadUInt(info.m_nRate);

        m_MustMaleDrop.push_back( info );
    }

    file.ReadUShort( nNum );
    for ( unsigned short i = 0; i < nNum; ++i )
    {
        CDropItemInfo info;
        file.ReadUInt(info.m_itemInfo.m_nItemType);
        file.ReadUShort(info.m_itemInfo.m_nItemCount);
        file.ReadInt(info.m_itemInfo.m_nValidTime);
        file.ReadUInt(info.m_nRate);

        m_MustFemaleDrop.push_back( info );
    }

    file.ReadUShort( nNum );
    for ( unsigned short i = 0; i < nNum; ++i )
    {
        CDebrisDropInfo info;
        file.ReadUInt( info.m_nDebrisID );
        file.ReadUInt( info.m_nDebrisCount );
        file.ReadUInt( info.m_nDropRate );

        m_MustDebrisDrop.push_back( info );
    }

    file.ReadUInt( m_nOptionalRate );
    file.ReadUInt( m_nOptionalNum );

    file.ReadUShort( nNum );
    for ( unsigned short i = 0; i < nNum; ++i )
    {
        CDropItemInfo info;
        file.ReadUInt(info.m_itemInfo.m_nItemType);
        file.ReadUShort(info.m_itemInfo.m_nItemCount);
        file.ReadInt(info.m_itemInfo.m_nValidTime);
        file.ReadUInt(info.m_nRate);

        m_OptionalMaleDrop.push_back( info );
    }

    file.ReadUShort( nNum );
    for ( unsigned short i = 0; i < nNum; ++i )
    {
        CDropItemInfo info;
        file.ReadUInt(info.m_itemInfo.m_nItemType);
        file.ReadUShort(info.m_itemInfo.m_nItemCount);
        file.ReadInt(info.m_itemInfo.m_nValidTime);
        file.ReadUInt(info.m_nRate);

        m_OptionalFemaleDrop.push_back( info );
    }

    file.ReadUShort( nNum );
    for ( unsigned short i = 0; i < nNum; ++i )
    {
        CDebrisDropInfo info;
        file.ReadUInt( info.m_nDebrisID );
        file.ReadUInt( info.m_nDebrisCount );
        file.ReadUInt( info.m_nDropRate );

        m_OptionalDebrisDrop.push_back( info );
    }

    return true;
}
Exemple #12
0
bool CBossConfig::Load(CFileStream&file)
{
    char cBossId = 0;
    file.ReadChar( cBossId);
    m_nBossID = cBossId;

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

    file.ReadChar( 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;
}
Exemple #13
0
bool ExpConfig::Load(CFileStream&file)
{
    file.ReadUShort(m_nLev) ;
    file.ReadInt(m_nExp) ;
    return true ;
}