示例#1
0
 internal static void Write(int version, BinaryWriter bw, talk_proc talk_proc)
 {
     bw.Write(talk_proc.id_talk);
     GlobalFunctions.WriteNameChars(bw, talk_proc.text);
     bw.Write(talk_proc.num_window);
     for (int i = 0; i < talk_proc.num_window; i++)
     {
         window.Write(version, bw, talk_proc.windows[i]);
     }
 }
示例#2
0
 internal static void Write(int version, BinaryWriter bw, window window)
 {
     bw.Write(window.id);
     bw.Write(window.id_parent);
     bw.Write(window.talk_text_len);
     GlobalFunctions.WriteNameChars(bw, window.talk_text);
     bw.Write(window.num_option);
     for (int i = 0; i < window.num_option; i++)
     {
         option.Write(version, bw, window.options[i]);
     }
 }
示例#3
0
        internal static void Write(int version, BinaryWriter bw, AWARD_DATA AWARD_DATA)
        {
            bw.Write(AWARD_DATA.m_ulGoldNum);
            bw.Write(AWARD_DATA.m_ulExp);
            if (version >= 113)
            {
                bw.Write(AWARD_DATA.m_ulRealmExp);
                bw.Write(AWARD_DATA.m_bExpandRealmLevelMax);
            }
            if (version >= 153)
            {
                bw.Write(AWARD_DATA.NewTaskSpace);
            }
            bw.Write(AWARD_DATA.m_ulNewTask);
            bw.Write(AWARD_DATA.m_ulSP);
            bw.Write(AWARD_DATA.m_lReputation);
            bw.Write(AWARD_DATA.m_ulNewPeriod);
            bw.Write(AWARD_DATA.m_ulNewRelayStation);
            bw.Write(AWARD_DATA.m_ulStorehouseSize);
            if (version >= 57)
            {
                bw.Write(AWARD_DATA.m_ulStorehouseSize2);
                bw.Write(AWARD_DATA.m_ulStorehouseSize3);
            }
            if (version >= 75)
            {
                bw.Write(AWARD_DATA.m_ulStorehouseSize4);
            }
            if (version >= 52)
            {
                bw.Write(AWARD_DATA.m_lInventorySize);
                bw.Write(AWARD_DATA.m_ulPetInventorySize);
            }
            bw.Write(AWARD_DATA.m_ulFuryULimit);
            bw.Write(AWARD_DATA.m_ulTransWldId);
            if (version >= 161)
            {
                bw.Write(AWARD_DATA.CrossServerID);
            }
            ZONE_VERT.Write(version, bw, AWARD_DATA.m_TransPt);
            if (version >= 52)
            {
                bw.Write(AWARD_DATA.m_lMonsCtrl);
                bw.Write(AWARD_DATA.m_bTrigCtrl);
            }
            if (version >= 54)
            {
                bw.Write(AWARD_DATA.m_bUseLevCo);
            }
            if (version >= 55)
            {
                bw.Write(AWARD_DATA.m_bDivorce);
            }
            if (version >= 56)
            {
                bw.Write(AWARD_DATA.m_bSendMsg);
                bw.Write(AWARD_DATA.m_nMsgChannel);
            }
            int cand_items_count = GlobalFunctions.GetMaxAwardCandidates(version);

            if (AWARD_DATA.m_ulCandItems > cand_items_count)
            {
                bw.Write(cand_items_count);
            }
            else
            {
                bw.Write(AWARD_DATA.m_ulCandItems);
            }
            if (version < 176)
            {
                bw.Write(AWARD_DATA.m_CandItemsPointer);
            }
            if (version >= 64)
            {
                bw.Write(AWARD_DATA.m_ulSummonedMonsters);
                if (version < 176)
                {
                    bw.Write(AWARD_DATA.m_MonstersPointer);
                }
            }
            if (version >= 69)
            {
                bw.Write(AWARD_DATA.m_bAwardDeath);
                bw.Write(AWARD_DATA.m_bAwardDeathWithLoss);
            }
            if (version >= 75)
            {
                bw.Write(AWARD_DATA.m_ulDividend);
            }
            if (version >= 78)
            {
                bw.Write(AWARD_DATA.m_bAwardSkill);
                bw.Write(AWARD_DATA.m_iAwardSkillID);
                bw.Write(AWARD_DATA.m_iAwardSkillLevel);
            }
            if (version >= 124)
            {
                bw.Write(AWARD_DATA.m_iSoloTowerChallengeScore);
            }
            if (version >= 153)
            {
                bw.Write(AWARD_DATA.AwardOpenSystem);
            }
            if (version >= 75)
            {
                bw.Write(AWARD_DATA.m_ulSpecifyContribTaskID);
            }
            if (version >= 78)
            {
                bw.Write(AWARD_DATA.m_ulSpecifyContribSubTaskID);
            }
            if (version >= 75)
            {
                bw.Write(AWARD_DATA.m_ulSpecifyContrib);
                bw.Write(AWARD_DATA.m_ulContrib);
                bw.Write(AWARD_DATA.m_ulRandContrib);
                bw.Write(AWARD_DATA.m_ulLowestcontrib);
            }
            if (version >= 87)
            {
                bw.Write(AWARD_DATA.m_iFactionContrib);
            }
            if (version >= 89)
            {
                bw.Write(AWARD_DATA.m_iFactionExpContrib);
            }
            if (version >= 75)
            {
                bw.Write(AWARD_DATA.m_ulPQRankingAwardCnt);
                if (version < 176)
                {
                    bw.Write(AWARD_DATA.m_RankingAwardPointer);
                }
            }
            if (version >= 59)
            {
                bw.Write(AWARD_DATA.m_ulChangeKeyCnt);
                if (version < 176)
                {
                    bw.Write(AWARD_DATA.m_ulChangeKeyPointer);
                    bw.Write(AWARD_DATA.m_plChangeKeyValuePointer);
                    bw.Write(AWARD_DATA.m_pbChangeTypePointer);
                }
            }
            if (version >= 178)
            {
                bw.Write(AWARD_DATA.PersonChangeKeyCnt);
            }
            if (version >= 112)
            {
                bw.Write(AWARD_DATA.m_ulHistoryChangeCnt);
                if (version < 176)
                {
                    bw.Write(AWARD_DATA.m_plHistoryChangeKeyPointer);
                    bw.Write(AWARD_DATA.m_plHistoryChangeKeyValuePointer);
                    bw.Write(AWARD_DATA.m_pbHistoryChangeTypePointer);
                }
            }
            if (version >= 59)
            {
                bw.Write(AWARD_DATA.m_bMulti);
                bw.Write(AWARD_DATA.m_nNumType);
                bw.Write(AWARD_DATA.m_lNum);
                bw.Write(AWARD_DATA.m_ulDisplayKeyCnt);
                if (version < 176)
                {
                    bw.Write(AWARD_DATA.m_ulDisplayKeyCntPointer);
                }
            }
            if (version >= 63)
            {
                bw.Write(AWARD_DATA.m_ulExpCnt);
                if (version < 176)
                {
                    bw.Write(AWARD_DATA.m_pszExpPointer);
                    bw.Write(AWARD_DATA.m_pExpArrPointer);
                }
                bw.Write(AWARD_DATA.m_ulTaskCharCnt);
                if (version < 176)
                {
                    bw.Write(AWARD_DATA.m_pTaskCharPointer);
                }
            }
            if (version >= 97)
            {
                bw.Write(AWARD_DATA.m_iForceContribution);
                bw.Write(AWARD_DATA.m_iForceReputation);
                bw.Write(AWARD_DATA.m_iForceActivity);
            }
            if (version >= 100)
            {
                bw.Write(AWARD_DATA.m_iForceSetRepu);
            }
            if (version >= 101)
            {
                bw.Write(AWARD_DATA.m_iTaskLimit);
            }
            if (version >= 109)
            {
                bw.Write(AWARD_DATA.m_ulTitleNum);
                if (version < 176)
                {
                    bw.Write(AWARD_DATA.m_pTitleAwardPointer);
                }
            }
            if (version >= 115)
            {
                bw.Write(AWARD_DATA.m_iLeaderShip);
            }
            if (version >= 119)
            {
                bw.Write(AWARD_DATA.m_iWorldContribution);
            }
            if (version >= 126)
            {
                for (int i = 0; i < AWARD_DATA.m_iHomeResource.Length; i++)
                {
                    bw.Write(AWARD_DATA.m_iHomeResource[i]);
                }
                bw.Write(AWARD_DATA.m_bCreateHome);
            }
            if (version >= 135)
            {
                bw.Write(AWARD_DATA.AwardLeaveCarrier);
            }
            if (version >= 146)
            {
                bw.Write(AWARD_DATA.AwardFactionMoney);
                bw.Write(AWARD_DATA.AwardFactionPersonScore);
                bw.Write(AWARD_DATA.AwardFactionTarget);
                if (version < 176)
                {
                    bw.Write(AWARD_DATA.AwardFactionTargetDataPointer);
                }
                bw.Write(AWARD_DATA.SubmitRankScore);
                SUBMIT_RANK_INFO.Write(version, bw, AWARD_DATA.submit_rank);
            }
            if (version >= 156)
            {
                bw.Write(AWARD_DATA.AwardMentorStudent);
                bw.Write(AWARD_DATA.AwardCoupleIntimacy);
            }
            if (version >= 162)
            {
                bw.Write(AWARD_DATA.AwardRedBookExp);
            }
            if (version >= 167)
            {
                bw.Write(AWARD_DATA.AwardCampScore);
                bw.Write(AWARD_DATA.AwardCrossServerMoney);
                bw.Write(AWARD_DATA.InviterAward);
                bw.Write(AWARD_DATA.AwardFriendPoint);
            }
            if (version >= 175)
            {
                bw.Write(AWARD_DATA.InviterAwardCount);
            }
            if (version >= 180)
            {
                bw.Write(AWARD_DATA.AwardPerceptionValue);
            }
            for (int i = 0; i < AWARD_DATA.m_ulCandItems && i < cand_items_count; i++)
            {
                AWARD_ITEMS_CAND.Write(version, bw, AWARD_DATA.m_CandItems[i]);
            }
            if (version >= 64 && AWARD_DATA.m_ulSummonedMonsters > 0)
            {
                AWARD_MONSTERS_SUMMONED.Write(version, bw, AWARD_DATA.m_SummonedMonsters);
            }
            if (version >= 75 && AWARD_DATA.m_ulPQRankingAwardCnt > 0)
            {
                AWARD_PQ_RANKING.Write(version, bw, AWARD_DATA.m_PQRankingAward);
            }
            if (version >= 109)
            {
                for (int i = 0; i < AWARD_DATA.m_ulTitleNum; i++)
                {
                    TITLE_AWARD.Write(version, bw, AWARD_DATA.m_pTitleAward[i]);
                }
            }
            if (version >= 59)
            {
                for (int i = 0; i < AWARD_DATA.m_ulChangeKeyCnt; i++)
                {
                    bw.Write(AWARD_DATA.m_plChangeKey[i]);
                    bw.Write(AWARD_DATA.m_plChangeKeyValue[i]);
                    bw.Write(AWARD_DATA.m_pbChangeType[i]);
                }
            }
            if (version >= 178)
            {
                for (int i = 0; i < AWARD_DATA.PersonChangeKeyCnt; i++)
                {
                    bw.Write(AWARD_DATA.PersonChangeKey[i]);
                    bw.Write(AWARD_DATA.PersonChangeKeyValue[i]);
                    bw.Write(AWARD_DATA.PersonChangeType[i]);
                }
            }
            if (version >= 112)
            {
                for (int i = 0; i < AWARD_DATA.m_ulHistoryChangeCnt; i++)
                {
                    bw.Write(AWARD_DATA.m_plHistoryChangeKey[i]);
                    bw.Write(AWARD_DATA.m_plHistoryChangeKeyValue[i]);
                    bw.Write(AWARD_DATA.m_pbHistoryChangeType[i]);
                }
            }
            if (version >= 59)
            {
                for (int i = 0; i < AWARD_DATA.m_ulDisplayKeyCnt; i++)
                {
                    bw.Write(AWARD_DATA.m_plDisplayKey[i]);
                }
            }
            if (version >= 63)
            {
                for (int i = 0; i < AWARD_DATA.m_ulExpCnt; i++)
                {
                    GlobalFunctions.WriteChars(bw, AWARD_DATA.m_pszExp[i]);
                    for (int j = 0; j < AWARD_DATA.m_pExpArr[i].Length; j++)
                    {
                        TASK_EXPRESSION.Write(version, bw, AWARD_DATA.m_pExpArr[i][j]);
                    }
                }
            }
            if (version >= 63)
            {
                for (int i = 0; i < AWARD_DATA.m_ulTaskCharCnt; i++)
                {
                    GlobalFunctions.WriteNameChars(bw, AWARD_DATA.m_pTaskChar[i]);
                }
            }
            if (version >= 146)
            {
                for (int i = 0; i < AWARD_DATA.AwardFactionTarget; i++)
                {
                    FACTION_TARGET_DATA.Write(version, bw, AWARD_DATA.AwardFactionTargetData[i]);
                }
            }
        }
示例#4
0
 internal static void Write(int version, BinaryWriter bw, option option)
 {
     bw.Write(option.param);
     GlobalFunctions.WriteNameChars(bw, option.text);
     bw.Write(option.id);
 }