示例#1
0
bool CThemeConfig::Save(CFileStream & file)
{
    file.WriteUInt( m_nThemeID );
    file.WriteUShort((unsigned short)m_strName.size());
    file.WriteString(m_strName);

    file.WriteUInt( m_nOpenTime );
    file.WriteUInt( m_nEndTime );

    file.WriteUShort((unsigned short)m_strThemeIcon.size());
    file.WriteString(m_strThemeIcon);

    file.WriteUShort((unsigned short)m_strThemeAtlas.size());
    file.WriteString(m_strThemeAtlas);

    file.WriteUShort((unsigned short)m_strSceneIcon.size());
    file.WriteString(m_strSceneIcon);

    file.WriteUShort((unsigned short)m_strSceneAtlas.size());
    file.WriteString(m_strSceneAtlas);

    file.WriteUInt( m_nStoryID );

    return true;
}
示例#2
0
bool CParcloseConfig::Save(CFileStream&file)
{
    file.WriteUInt( m_nParcloseID );
    file.WriteUShort((unsigned short)m_strParcloseName.size());
    file.WriteString(m_strParcloseName);

    file.WriteUInt( m_nBeginStoryID );
    file.WriteUInt( m_nEndStoryID );
    file.WriteUInt( m_nCostCrystal );
    file.WriteUInt( m_nSceneID );
    file.WriteUInt( m_nMusicID );

    file.WriteUShort((unsigned short)m_strMusicName.size());
    file.WriteString(m_strMusicName);

    file.WriteUInt( m_nMusicMode );
    file.WriteUInt( m_nMusicLevel );
    file.WriteFloat(m_fPosX);
    file.WriteFloat(m_fPosY);

    file.WriteUShort( (unsigned short)m_Targets.size() );
    for ( size_t i = 0; i < m_Targets.size(); ++i)
    {
        file.WriteUInt( m_Targets[i]);
    }

    file.WriteUShort( (unsigned short)m_BossIDList.size() );
    for ( size_t i = 0; i < m_BossIDList.size(); ++i)
    {
        file.WriteUInt( m_BossIDList[i]);
    }

    file.WriteUShort( (unsigned short)m_BossScoreList.size() );
    for ( size_t i = 0; i < m_BossScoreList.size(); ++i)
    {
        file.WriteUInt( m_BossScoreList[i].m_nMinScore );
        file.WriteUInt( m_BossScoreList[i].m_nMaxScore );
    }

    file.WriteUInt(m_nDailyQuickFinishNum);
    return true;
}
示例#3
0
bool CTargetConfig::Save(CFileStream&file)
{
    file.WriteUInt( m_nTargetID );

    file.WriteUShort((unsigned short)m_strDesc.size());
    file.WriteString(m_strDesc);

    file.WriteUInt( m_nFlag );

    file.WriteUShort((unsigned short)m_strValue.size());
    file.WriteString(m_strValue);

    file.WriteUShort((unsigned short)m_mapStarValue.size());
    std::map<unsigned short,unsigned int>::iterator it = m_mapStarValue.begin();
    for (; it != m_mapStarValue.end(); ++it)
    {
        file.WriteUShort(it->first);
        file.WriteUInt(it->second);
    }

    return true;
}
示例#4
0
bool CDungeonConfig::Save(CFileStream&file)
{
    file.WriteUInt( m_nDungeonID );
    file.WriteUShort((unsigned short)m_strDungeonName.size());
    file.WriteString(m_strDungeonName);

    file.WriteUShort((unsigned short)m_strIconName.size());
    file.WriteString(m_strIconName);

    file.WriteUShort((unsigned short)m_strIconAtlas.size());
    file.WriteString(m_strIconAtlas);

    file.WriteUInt( m_nStoryID );
    file.WriteUShort( (unsigned short)m_ParcloseList.size() );

    for ( size_t i = 0; i < m_ParcloseList.size(); ++i)
    {
        file.WriteUInt( m_ParcloseList[i]);
    }

    return true;
}
示例#5
0
bool CDebrisConfig::Save(CFileStream&file)
{
    file.WriteUInt( m_nDebrisID );

    file.WriteUShort((unsigned short)m_strName.size());
    file.WriteString(m_strName);

    file.WriteUShort((unsigned short)m_strIconName.size());
    file.WriteString(m_strIconName);

    file.WriteUShort((unsigned short)m_strAtlasName.size());
    file.WriteString(m_strAtlasName);

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

    file.WriteUShort( (unsigned short)m_MaleExchangeItem.size() );
    std::vector<CItem>::iterator it = m_MaleExchangeItem.begin();
    for ( ; it != m_MaleExchangeItem.end(); ++it )
    {
        file.WriteUInt( it->m_nItemType );
        file.WriteUShort( it->m_nItemCount );
        file.WriteInt( it->m_nValidTime );
    }

    file.WriteUShort( (unsigned short)m_FemaleExchangeItem.size() );
    std::vector<CItem>::iterator it1 = m_FemaleExchangeItem.begin();
    for ( ; it1 != m_FemaleExchangeItem.end(); ++it1 )
    {
        file.WriteUInt( it1->m_nItemType );
        file.WriteUShort( it1->m_nItemCount );
        file.WriteInt( it1->m_nValidTime );
    }

    return true;
}
示例#6
0
bool CBossConfig::Save(CFileStream&file)
{
    file.WriteChar((char)m_nBossID);
    file.WriteUShort((unsigned short)m_strName.size());
    file.WriteString(m_strName);
    file.WriteChar( m_cSex );
    file.WriteUShort((unsigned char)m_cSKinColor);

    std::map<EItemClothType, itemtype_t>::iterator it = m_Equips.begin();
    for ( ; it != m_Equips.end(); ++it )
    {
        file.WriteUInt( it->second );
    }

    return true;
}
示例#7
0
bool CStoryConfig::Save(CFileStream&file)
{

    file.WriteUInt( m_nStoryID );

    file.WriteUShort( (unsigned short)m_NPCList.size() );
    for ( size_t i = 0; i < m_NPCList.size(); ++i)
    {
        file.WriteUInt( m_NPCList[i]);
    }

    file.WriteUShort( (unsigned short)m_ContentList.size() );
    for ( size_t i = 0; i < m_ContentList.size(); ++i)
    {
        file.WriteUInt( m_ContentList[i].m_nNPCID);

        file.WriteUShort((unsigned short)m_ContentList[i].m_strContent.size());
        file.WriteString(m_ContentList[i].m_strContent);
    }

    return true;
}