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; }
bool CRubbishDropConfig::Save(CFileStream&file) { file.WriteUInt( m_nRubbishDropID ); file.WriteUShort( (unsigned short)m_MaleDrop.size() ); std::vector<CDropItemInfo>::iterator it = m_MaleDrop.begin(); for ( ; it != m_MaleDrop.end(); ++it ) { file.WriteUInt( it->m_itemInfo.m_nItemType); file.WriteUShort( it->m_itemInfo.m_nItemCount); file.WriteInt( it->m_itemInfo.m_nValidTime); file.WriteUInt( it->m_nRate ); } file.WriteUShort( (unsigned short)m_FemaleDrop.size() ); std::vector<CDropItemInfo>::iterator it1 = m_FemaleDrop.begin(); for ( ; it1 != m_FemaleDrop.end(); ++it1 ) { file.WriteUInt( it1->m_itemInfo.m_nItemType); file.WriteUShort( it1->m_itemInfo.m_nItemCount); file.WriteInt( it1->m_itemInfo.m_nValidTime); file.WriteUInt( it1->m_nRate ); } return true; }
bool AuctionGoodsInfo::SaveToFile(CFileStream &file) { if (0 == m_uSerializeID || m_uAddPercent > 100 || !m_cGoodsInfo.SaveToFile(file)) return false; file.WriteUShort(m_uSerializeID); file.WriteUShort(m_uAddPercent); file.WriteUInt(m_uMinAdd); file.WriteFloat(m_fCountDown); file.WriteUInt(m_uCurPrice); file.WriteUInt(m_uRoleID); file.WriteString2(m_strRoleName); return true; }
bool CThemeParcloseConfig::Save(CFileStream & file) { file.WriteUInt(m_nThemeID); CParcloseConfig::Save(file); return true; }
bool CThemeDropConfig::Save(CFileStream&file) { file.WriteUInt( m_nThemeID ); CMainlineDropConfig::Save( file ); return true; }
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; }
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; }
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; }
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; }
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; }
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; }
bool CMainlineDropConfig::Save(CFileStream&file) { file.WriteUInt( m_nParcloseID ); file.WriteUInt( m_nMustDropNum ); file.WriteUShort( (unsigned short)m_MustMaleDrop.size() ); std::vector<CDropItemInfo>::iterator it = m_MustMaleDrop.begin(); for ( ; it != m_MustMaleDrop.end(); ++it ) { file.WriteUInt( it->m_itemInfo.m_nItemType); file.WriteUShort( it->m_itemInfo.m_nItemCount); file.WriteInt( it->m_itemInfo.m_nValidTime); file.WriteUInt( it->m_nRate ); } file.WriteUShort( (unsigned short)m_MustFemaleDrop.size() ); std::vector<CDropItemInfo>::iterator it1 = m_MustFemaleDrop.begin(); for ( ; it1 != m_MustFemaleDrop.end(); ++it1 ) { file.WriteUInt( it1->m_itemInfo.m_nItemType); file.WriteUShort( it1->m_itemInfo.m_nItemCount); file.WriteInt( it1->m_itemInfo.m_nValidTime); file.WriteUInt( it1->m_nRate ); } file.WriteUShort( (unsigned short)m_MustDebrisDrop.size() ); std::vector<CDebrisDropInfo>::iterator itDebris = m_MustDebrisDrop.begin(); for ( ; itDebris != m_MustDebrisDrop.end(); ++itDebris ) { file.WriteUInt( itDebris->m_nDebrisID); file.WriteUInt( itDebris->m_nDebrisCount ); file.WriteUInt( itDebris->m_nDropRate ); } file.WriteUInt( m_nOptionalRate ); file.WriteUInt( m_nOptionalNum ); file.WriteUShort( (unsigned short)m_OptionalMaleDrop.size() ); std::vector<CDropItemInfo>::iterator it2 = m_OptionalMaleDrop.begin(); for ( ; it2 != m_OptionalMaleDrop.end(); ++it2 ) { file.WriteUInt( it2->m_itemInfo.m_nItemType); file.WriteUShort( it2->m_itemInfo.m_nItemCount); file.WriteInt( it2->m_itemInfo.m_nValidTime); file.WriteUInt( it2->m_nRate ); } file.WriteUShort( (unsigned short)m_OptionalFemaleDrop.size() ); std::vector<CDropItemInfo>::iterator it3 = m_OptionalFemaleDrop.begin(); for ( ; it3 != m_OptionalFemaleDrop.end(); ++it3 ) { file.WriteUInt( it3->m_itemInfo.m_nItemType); file.WriteUShort( it3->m_itemInfo.m_nItemCount); file.WriteInt( it3->m_itemInfo.m_nValidTime); file.WriteUInt( it3->m_nRate ); } file.WriteUShort( (unsigned short)m_OptionalDebrisDrop.size() ); std::vector<CDebrisDropInfo>::iterator itDebris1 = m_OptionalDebrisDrop.begin(); for ( ; itDebris1 != m_OptionalDebrisDrop.end(); ++itDebris1 ) { file.WriteUInt( itDebris1->m_nDebrisID); file.WriteUInt( itDebris1->m_nDebrisCount ); file.WriteUInt( itDebris1->m_nDropRate ); } return true; }