internal static void Read(int version, BinaryReader br, int Id, talk_proc talk_proc) { talk_proc.crypt_key = Id; talk_proc.id_talk = br.ReadInt32(); talk_proc.text = GlobalFunctions.ReadNameChars(64, br); talk_proc.num_window = br.ReadInt32(); talk_proc.windows = new window[talk_proc.num_window]; for (int i = 0; i < talk_proc.num_window; i++) { talk_proc.windows[i] = new window(); talk_proc.windows[i].crypt_key = talk_proc.crypt_key; window.Read(version, br, talk_proc.windows[i]); } }
internal static void Read(int version, BinaryReader br, window window) { window.id = br.ReadInt32(); window.id_parent = br.ReadInt32(); window.talk_text_len = br.ReadInt32(); window.talk_text = GlobalFunctions.ReadNameChars(window.talk_text_len, br); window.num_option = br.ReadInt32(); window.options = new option[window.num_option]; for (int i = 0; i < window.num_option; i++) { window.options[i] = new option(); window.options[i].crypt_key = window.crypt_key; option.Read(version, br, window.options[i]); } }
internal static void Read(int version, BinaryReader br, AWARD_DATA AWARD_DATA) { AWARD_DATA.m_ulGoldNum = br.ReadInt32(); AWARD_DATA.m_ulExp = br.ReadInt32(); if (version >= 113) { AWARD_DATA.m_ulRealmExp = br.ReadInt32(); AWARD_DATA.m_bExpandRealmLevelMax = br.ReadBoolean(); } if (version >= 153) { AWARD_DATA.NewTaskSpace = br.ReadInt32(); } AWARD_DATA.m_ulNewTask = br.ReadInt32(); AWARD_DATA.m_ulSP = br.ReadInt32(); AWARD_DATA.m_lReputation = br.ReadInt32(); AWARD_DATA.m_ulNewPeriod = br.ReadInt32(); AWARD_DATA.m_ulNewRelayStation = br.ReadInt32(); AWARD_DATA.m_ulStorehouseSize = br.ReadInt32(); if (version >= 57) { AWARD_DATA.m_ulStorehouseSize2 = br.ReadInt32(); AWARD_DATA.m_ulStorehouseSize3 = br.ReadInt32(); } if (version >= 75) { AWARD_DATA.m_ulStorehouseSize4 = br.ReadInt32(); } if (version >= 52) { AWARD_DATA.m_lInventorySize = br.ReadInt32(); AWARD_DATA.m_ulPetInventorySize = br.ReadInt32(); } AWARD_DATA.m_ulFuryULimit = br.ReadInt32(); AWARD_DATA.m_ulTransWldId = br.ReadInt32(); if (version >= 161) { AWARD_DATA.CrossServerID = br.ReadInt32(); } ZONE_VERT.Read(version, br, AWARD_DATA.m_TransPt); if (version >= 52) { AWARD_DATA.m_lMonsCtrl = br.ReadInt32(); AWARD_DATA.m_bTrigCtrl = br.ReadBoolean(); } if (version >= 54) { AWARD_DATA.m_bUseLevCo = br.ReadBoolean(); } if (version >= 55) { AWARD_DATA.m_bDivorce = br.ReadBoolean(); } if (version >= 56) { AWARD_DATA.m_bSendMsg = br.ReadBoolean(); AWARD_DATA.m_nMsgChannel = br.ReadInt32(); } AWARD_DATA.m_ulCandItems = br.ReadInt32(); if (version < 176) { AWARD_DATA.m_CandItemsPointer = br.ReadInt32(); } if (version >= 64) { AWARD_DATA.m_ulSummonedMonsters = br.ReadInt32(); if (version < 176) { AWARD_DATA.m_MonstersPointer = br.ReadInt32(); } } if (version >= 69) { AWARD_DATA.m_bAwardDeath = br.ReadBoolean(); AWARD_DATA.m_bAwardDeathWithLoss = br.ReadBoolean(); } if (version >= 75) { AWARD_DATA.m_ulDividend = br.ReadInt32(); } if (version >= 78) { AWARD_DATA.m_bAwardSkill = br.ReadBoolean(); AWARD_DATA.m_iAwardSkillID = br.ReadInt32(); AWARD_DATA.m_iAwardSkillLevel = br.ReadInt32(); } if (version >= 124) { AWARD_DATA.m_iSoloTowerChallengeScore = br.ReadInt32(); } if (version >= 153) { AWARD_DATA.AwardOpenSystem = br.ReadInt32(); } if (version >= 75) { AWARD_DATA.m_ulSpecifyContribTaskID = br.ReadInt32(); } if (version >= 78) { AWARD_DATA.m_ulSpecifyContribSubTaskID = br.ReadInt32(); } if (version >= 75) { AWARD_DATA.m_ulSpecifyContrib = br.ReadInt32(); AWARD_DATA.m_ulContrib = br.ReadInt32(); AWARD_DATA.m_ulRandContrib = br.ReadInt32(); AWARD_DATA.m_ulLowestcontrib = br.ReadInt32(); } if (version >= 87) { AWARD_DATA.m_iFactionContrib = br.ReadInt32(); } if (version >= 89) { AWARD_DATA.m_iFactionExpContrib = br.ReadInt32(); } if (version >= 75) { AWARD_DATA.m_ulPQRankingAwardCnt = br.ReadInt32(); if (version < 176) { AWARD_DATA.m_RankingAwardPointer = br.ReadInt32(); } } if (version >= 59) { AWARD_DATA.m_ulChangeKeyCnt = br.ReadInt32(); if (version < 176) { AWARD_DATA.m_ulChangeKeyPointer = br.ReadInt32(); AWARD_DATA.m_plChangeKeyValuePointer = br.ReadInt32(); AWARD_DATA.m_pbChangeTypePointer = br.ReadInt32(); } } if (version >= 178) { AWARD_DATA.PersonChangeKeyCnt = br.ReadInt32(); } if (version >= 112) { AWARD_DATA.m_ulHistoryChangeCnt = br.ReadInt32(); if (version < 176) { AWARD_DATA.m_plHistoryChangeKeyPointer = br.ReadInt32(); AWARD_DATA.m_plHistoryChangeKeyValuePointer = br.ReadInt32(); AWARD_DATA.m_pbHistoryChangeTypePointer = br.ReadInt32(); } } if (version >= 59) { AWARD_DATA.m_bMulti = br.ReadBoolean(); AWARD_DATA.m_nNumType = br.ReadInt32(); AWARD_DATA.m_lNum = br.ReadInt32(); AWARD_DATA.m_ulDisplayKeyCnt = br.ReadInt32(); if (version < 176) { AWARD_DATA.m_ulDisplayKeyCntPointer = br.ReadInt32(); } } if (version >= 63) { AWARD_DATA.m_ulExpCnt = br.ReadInt32(); if (version < 176) { AWARD_DATA.m_pszExpPointer = br.ReadInt32(); AWARD_DATA.m_pExpArrPointer = br.ReadInt32(); } AWARD_DATA.m_ulTaskCharCnt = br.ReadInt32(); if (version < 176) { AWARD_DATA.m_pTaskCharPointer = br.ReadInt32(); } } if (version >= 97) { AWARD_DATA.m_iForceContribution = br.ReadInt32(); AWARD_DATA.m_iForceReputation = br.ReadInt32(); AWARD_DATA.m_iForceActivity = br.ReadInt32(); } if (version >= 100) { AWARD_DATA.m_iForceSetRepu = br.ReadInt32(); } if (version >= 101) { AWARD_DATA.m_iTaskLimit = br.ReadInt32(); } if (version >= 109) { AWARD_DATA.m_ulTitleNum = br.ReadInt32(); if (version < 176) { AWARD_DATA.m_pTitleAwardPointer = br.ReadInt32(); } } if (version >= 115) { AWARD_DATA.m_iLeaderShip = br.ReadInt32(); } if (version >= 119) { AWARD_DATA.m_iWorldContribution = br.ReadInt32(); } if (version >= 126) { for (int i = 0; i < AWARD_DATA.m_iHomeResource.Length; i++) { AWARD_DATA.m_iHomeResource[i] = br.ReadInt32(); } AWARD_DATA.m_bCreateHome = br.ReadBoolean(); } if (version >= 135) { AWARD_DATA.AwardLeaveCarrier = br.ReadBoolean(); } if (version >= 146) { AWARD_DATA.AwardFactionMoney = br.ReadInt32(); AWARD_DATA.AwardFactionPersonScore = br.ReadInt32(); AWARD_DATA.AwardFactionTarget = br.ReadInt32(); if (version < 176) { AWARD_DATA.AwardFactionTargetDataPointer = br.ReadInt32(); } AWARD_DATA.SubmitRankScore = br.ReadBoolean(); SUBMIT_RANK_INFO.Read(version, br, AWARD_DATA.submit_rank); } if (version >= 156) { AWARD_DATA.AwardMentorStudent = br.ReadInt32(); AWARD_DATA.AwardCoupleIntimacy = br.ReadInt32(); } if (version >= 162) { AWARD_DATA.AwardRedBookExp = br.ReadInt32(); } if (version >= 167) { AWARD_DATA.AwardCampScore = br.ReadInt32(); AWARD_DATA.AwardCrossServerMoney = br.ReadInt32(); AWARD_DATA.InviterAward = br.ReadInt32(); AWARD_DATA.AwardFriendPoint = br.ReadInt32(); } if (version >= 175) { AWARD_DATA.InviterAwardCount = br.ReadInt32(); } if (version >= 180) { AWARD_DATA.AwardPerceptionValue = br.ReadInt32(); } AWARD_DATA.m_CandItems = new AWARD_ITEMS_CAND[AWARD_DATA.m_ulCandItems]; for (int i = 0; i < AWARD_DATA.m_ulCandItems; i++) { AWARD_DATA.m_CandItems[i] = new AWARD_ITEMS_CAND(); AWARD_ITEMS_CAND.Read(version, br, AWARD_DATA.m_CandItems[i]); } if (version >= 64 && AWARD_DATA.m_ulSummonedMonsters > 0) { AWARD_DATA.m_SummonedMonsters.m_ulMonsterNum = AWARD_DATA.m_ulSummonedMonsters; AWARD_MONSTERS_SUMMONED.Read(version, br, AWARD_DATA.m_SummonedMonsters); } if (version >= 75 && AWARD_DATA.m_ulPQRankingAwardCnt > 0) { AWARD_DATA.m_PQRankingAward.m_ulRankingAwardNum = AWARD_DATA.m_ulPQRankingAwardCnt; AWARD_PQ_RANKING.Read(version, br, AWARD_DATA.m_PQRankingAward); } if (version >= 109) { AWARD_DATA.m_pTitleAward = new TITLE_AWARD[AWARD_DATA.m_ulTitleNum]; for (int i = 0; i < AWARD_DATA.m_ulTitleNum; i++) { AWARD_DATA.m_pTitleAward[i] = new TITLE_AWARD(); TITLE_AWARD.Read(version, br, AWARD_DATA.m_pTitleAward[i]); } } if (version >= 59) { AWARD_DATA.m_plChangeKey = new int[AWARD_DATA.m_ulChangeKeyCnt]; AWARD_DATA.m_plChangeKeyValue = new int[AWARD_DATA.m_ulChangeKeyCnt]; AWARD_DATA.m_pbChangeType = new bool[AWARD_DATA.m_ulChangeKeyCnt]; for (int i = 0; i < AWARD_DATA.m_ulChangeKeyCnt; i++) { AWARD_DATA.m_plChangeKey[i] = br.ReadInt32(); AWARD_DATA.m_plChangeKeyValue[i] = br.ReadInt32(); AWARD_DATA.m_pbChangeType[i] = br.ReadBoolean(); } } if (version >= 178) { AWARD_DATA.PersonChangeKey = new int[AWARD_DATA.PersonChangeKeyCnt]; AWARD_DATA.PersonChangeKeyValue = new int[AWARD_DATA.PersonChangeKeyCnt]; AWARD_DATA.PersonChangeType = new bool[AWARD_DATA.PersonChangeKeyCnt]; for (int i = 0; i < AWARD_DATA.PersonChangeKeyCnt; i++) { AWARD_DATA.PersonChangeKey[i] = br.ReadInt32(); AWARD_DATA.PersonChangeKeyValue[i] = br.ReadInt32(); AWARD_DATA.PersonChangeType[i] = br.ReadBoolean(); } } if (version >= 112) { AWARD_DATA.m_plHistoryChangeKey = new int[AWARD_DATA.m_ulHistoryChangeCnt]; AWARD_DATA.m_plHistoryChangeKeyValue = new int[AWARD_DATA.m_ulHistoryChangeCnt]; AWARD_DATA.m_pbHistoryChangeType = new bool[AWARD_DATA.m_ulHistoryChangeCnt]; for (int i = 0; i < AWARD_DATA.m_ulHistoryChangeCnt; i++) { AWARD_DATA.m_plHistoryChangeKey[i] = br.ReadInt32(); AWARD_DATA.m_plHistoryChangeKeyValue[i] = br.ReadInt32(); AWARD_DATA.m_pbHistoryChangeType[i] = br.ReadBoolean(); } } if (version >= 59) { AWARD_DATA.m_plDisplayKey = new int[AWARD_DATA.m_ulDisplayKeyCnt]; for (int i = 0; i < AWARD_DATA.m_ulDisplayKeyCnt; i++) { AWARD_DATA.m_plDisplayKey[i] = br.ReadInt32(); } } if (version >= 63) { AWARD_DATA.m_pszExp = new char[AWARD_DATA.m_ulExpCnt][]; AWARD_DATA.m_pExpArr = new TASK_EXPRESSION[AWARD_DATA.m_ulExpCnt][]; for (int i = 0; i < AWARD_DATA.m_ulExpCnt; i++) { AWARD_DATA.m_pszExp[i] = GlobalFunctions.ReadChars(GlobalData.TASK_AWARD_MAX_DISPLAY_CHAR_LEN, br); AWARD_DATA.m_pExpArr[i] = new TASK_EXPRESSION[GlobalData.TASK_AWARD_MAX_DISPLAY_CHAR_LEN]; for (int j = 0; j < AWARD_DATA.m_pExpArr[i].Length; j++) { AWARD_DATA.m_pExpArr[i][j] = new TASK_EXPRESSION(); TASK_EXPRESSION.Read(version, br, AWARD_DATA.m_pExpArr[i][j]); } } } if (version >= 63) { AWARD_DATA.m_pTaskChar = new short[AWARD_DATA.m_ulTaskCharCnt][]; for (int i = 0; i < AWARD_DATA.m_ulTaskCharCnt; i++) { AWARD_DATA.m_pTaskChar[i] = GlobalFunctions.ReadNameChars(64, br); } } if (version >= 146) { AWARD_DATA.AwardFactionTargetData = new FACTION_TARGET_DATA[AWARD_DATA.AwardFactionTarget]; for (int i = 0; i < AWARD_DATA.AwardFactionTarget; i++) { AWARD_DATA.AwardFactionTargetData[i] = new FACTION_TARGET_DATA(); FACTION_TARGET_DATA.Read(version, br, AWARD_DATA.AwardFactionTargetData[i]); } } }
internal static void Read(int version, BinaryReader br, option option) { option.param = br.ReadInt32(); option.text = GlobalFunctions.ReadNameChars(64, br); option.id = br.ReadInt32(); }