Ejemplo n.º 1
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;
}
Ejemplo n.º 2
0
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;
}