Ejemplo n.º 1
0
    private void OnCompleteBatch_DailyDungeon(object a_oObject)
    {
        if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_DAILYDUNGEON)
        {
            SoldierBatch.SOLDIERBATCH.Save_DailyDungeonBatchSolInfo();
        }
        clTempBattlePos[] tempBattlePosInfo = SoldierBatch.SOLDIERBATCH.GetTempBattlePosInfo();
        GS_CHARACTER_DAILYDUNGEON_SET_REQ gS_CHARACTER_DAILYDUNGEON_SET_REQ = new GS_CHARACTER_DAILYDUNGEON_SET_REQ();

        gS_CHARACTER_DAILYDUNGEON_SET_REQ.i8Diff       = SoldierBatch.DailyDungeonDifficulty;
        gS_CHARACTER_DAILYDUNGEON_SET_REQ.i32DayOfWeek = (int)NrTSingleton <DailyDungeonManager> .Instance.GetDayOfWeek();

        gS_CHARACTER_DAILYDUNGEON_SET_REQ.i8IsReset = 0;
        int num = 0;

        for (int i = 0; i < 9; i++)
        {
            if (tempBattlePosInfo[i].m_nSolID > 0L)
            {
                gS_CHARACTER_DAILYDUNGEON_SET_REQ.clSolBatchPosInfo[num].SolID = tempBattlePosInfo[i].m_nSolID;
                byte b          = 0;
                byte nBattlePos = 0;
                SoldierBatch.GetCalcBattlePos((long)tempBattlePosInfo[i].m_nBattlePos, ref b, ref nBattlePos);
                gS_CHARACTER_DAILYDUNGEON_SET_REQ.clSolBatchPosInfo[num].nBattlePos = nBattlePos;
                num++;
            }
        }
        gS_CHARACTER_DAILYDUNGEON_SET_REQ.nCombinationUnique = NrTSingleton <SolCombination_BatchSelectInfoManager> .Instance.GetUserSelectedUniqeKey(0);

        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_CHARACTER_DAILYDUNGEON_SET_REQ, gS_CHARACTER_DAILYDUNGEON_SET_REQ);
    }
Ejemplo n.º 2
0
    public void GetColosseumBatchKind()
    {
        int          num        = 0;
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo == null)
        {
            return;
        }
        for (int i = 0; i < 3; i++)
        {
            long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_COLOSSEUMBATCH1 + i);
            if (charSubData != 0L)
            {
                SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);
                sUBDATA_UNION.nSubData = charSubData;
                int  n32SubData_  = sUBDATA_UNION.n32SubData_0;
                int  n32SubData_2 = sUBDATA_UNION.n32SubData_1;
                byte b            = 0;
                byte b2           = 0;
                SoldierBatch.GetCalcBattlePos((long)n32SubData_, ref b, ref b2);
                if (b2 >= 0 && b2 < 9)
                {
                    if (n32SubData_2 > 0 && myCharInfo.IsEnableBatchColosseumSoldier(n32SubData_2))
                    {
                        this.m_arColosseumBatchCharKind[num] = n32SubData_2;
                        num++;
                    }
                }
            }
        }
    }
Ejemplo n.º 3
0
    public override void OnExit()
    {
        TsLog.Log("====== {0}.OnExit", new object[]
        {
            base.GetType().FullName
        });
        NrTSingleton <NkBattleCharManager> .Instance.Init();

        Battle.BabelPartyCount = (int)SoldierBatch.BABELTOWER_INFO.Count;
        SoldierBatch.BABELTOWER_INFO.Init();
        if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_MYTHRAID)
        {
            Battle.BabelPartyCount = (int)SoldierBatch.MYTHRAID_INFO.Count;
            for (int i = 0; i < (int)SoldierBatch.MYTHRAID_INFO.Count; i++)
            {
                if (i >= 4)
                {
                    return;
                }
                NrTSingleton <MythRaidManager> .Instance.partyPersonID[i]   = SoldierBatch.MYTHRAID_INFO.GetMythRaidPersonInfo(i).nPartyPersonID;
                NrTSingleton <MythRaidManager> .Instance.partyPersonName[i] = SoldierBatch.MYTHRAID_INFO.GetMythRaidPersonInfo(i).strCharName;
            }
            NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

            if (charPersonInfo == null)
            {
                return;
            }
            for (int j = 0; j < 4; j++)
            {
                if (charPersonInfo.GetPersonID() == SoldierBatch.MYTHRAID_INFO.GetMythRaidPersonInfo(j).nPartyPersonID)
                {
                    NrTSingleton <MythRaidManager> .Instance.m_iGuardAngelUnique = SoldierBatch.MYTHRAID_INFO.GetMythRaidPersonInfo(j).selectedGuardianUnique;
                }
            }
            SoldierBatch.MYTHRAID_INFO.Init();
            SoldierBatch.SOLDIERBATCH.CAMERA.CloseBattle();
        }
        this.m_SoldierBatch.Close();
        this.m_SoldierBatch.Dispose();
        this.m_SoldierBatch = null;
        Time.timeScale      = 1f;
        Resources.UnloadUnusedAssets();
        TsSceneSwitcher.Instance.DeleteScene(TsSceneSwitcher.ESceneType.SoldierBatchScene);
        GS_CHAR_STATE_SET_REQ gS_CHAR_STATE_SET_REQ = new GS_CHAR_STATE_SET_REQ();

        gS_CHAR_STATE_SET_REQ.nSet = 2;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_CHAR_STATE_SET_REQ, gS_CHAR_STATE_SET_REQ);
        NrTSingleton <FormsManager> .Instance.ClearShowHideForms();
    }
Ejemplo n.º 4
0
    public bool Send_GS_NEWEXPLORATION_START_REQ()
    {
        if (!this.CanPlay(this.GetFloor(), this.GetSubFloor()))
        {
            return(false);
        }
        if (!this.IsEmptyOrDieSol())
        {
            if (this.m_bIfDie_StopAutoBattle)
            {
                return(false);
            }
            if (!this.SetAutoBatch())
            {
                return(false);
            }
        }
        this.UpdateBattleSpeed();
        GS_NEWEXPLORATION_START_REQ gS_NEWEXPLORATION_START_REQ = new GS_NEWEXPLORATION_START_REQ();

        gS_NEWEXPLORATION_START_REQ.i8Floor              = this.GetFloor();
        gS_NEWEXPLORATION_START_REQ.i8SubFloor           = this.GetSubFloor();
        gS_NEWEXPLORATION_START_REQ.bOnBattleSpeed       = this.m_bBattleSpeedCheck;
        gS_NEWEXPLORATION_START_REQ.i32CombinationUnique = NrTSingleton <SolCombination_BatchSelectInfoManager> .Instance.GetUserSelectedUniqeKey(0);

        for (int i = 0; i < 5; i++)
        {
            if (!this.IsValidBattlePos(this.m_BattlePos[i]))
            {
                gS_NEWEXPLORATION_START_REQ.i64SolID[i] = 0L;
            }
            else
            {
                gS_NEWEXPLORATION_START_REQ.i64SolID[i] = this.m_BattlePos[i].m_nSolID;
                byte b  = 0;
                byte b2 = 0;
                SoldierBatch.GetCalcBattlePos((long)this.m_BattlePos[i].m_nBattlePos, ref b, ref b2);
                gS_NEWEXPLORATION_START_REQ.i8SolPosition[i] = b2;
            }
        }
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_NEWEXPLORATION_START_REQ, gS_NEWEXPLORATION_START_REQ);
        return(true);
    }
    private void OnCompleteGuildBossBatch(object a_oObject)
    {
        if (NrTSingleton <NkCharManager> .Instance.GetMyCharInfo() == null)
        {
            return;
        }
        if (NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1) == null)
        {
            return;
        }
        clTempBattlePos[] tempBattlePosInfo = SoldierBatch.SOLDIERBATCH.GetTempBattlePosInfo();
        SoldierBatch.SOLDIERBATCH.SaveGuildBossBatchSolInfo();
        GS_NEWGUILD_BOSS_STARTBATTLE_REQ gS_NEWGUILD_BOSS_STARTBATTLE_REQ = new GS_NEWGUILD_BOSS_STARTBATTLE_REQ();

        gS_NEWGUILD_BOSS_STARTBATTLE_REQ.i16Floor           = SoldierBatch.GUILDBOSS_INFO.m_i16Floor;
        gS_NEWGUILD_BOSS_STARTBATTLE_REQ.nCombinationUnique = NrTSingleton <SolCombination_BatchSelectInfoManager> .Instance.GetUserSelectedUniqeKey(0);

        int num = 0;

        for (int i = 0; i < 9; i++)
        {
            if (tempBattlePosInfo[i].m_nSolID > 0L)
            {
                gS_NEWGUILD_BOSS_STARTBATTLE_REQ.clSolBatchPosInfo[num].SolID = tempBattlePosInfo[i].m_nSolID;
                byte b          = 0;
                byte nBattlePos = 0;
                SoldierBatch.GetCalcBattlePos((long)tempBattlePosInfo[i].m_nBattlePos, ref b, ref nBattlePos);
                gS_NEWGUILD_BOSS_STARTBATTLE_REQ.clSolBatchPosInfo[num].nBattlePos = nBattlePos;
                num++;
            }
        }
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_NEWGUILD_BOSS_STARTBATTLE_REQ, gS_NEWGUILD_BOSS_STARTBATTLE_REQ);
        NEWGUILD_MY_BOSS_ROOMINFO guildBossMyRoomInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetGuildBossMyRoomInfo(SoldierBatch.GUILDBOSS_INFO.m_i16Floor);

        if (guildBossMyRoomInfo != null)
        {
            guildBossMyRoomInfo.ui8PlayState = 0;
        }
    }
    private void OnCompleteMineBatch(object a_oObject)
    {
        if (NrTSingleton <NkCharManager> .Instance.GetMyCharInfo() == null)
        {
            return;
        }
        if (NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1) == null)
        {
            return;
        }
        long guildID = NrTSingleton <NewGuildManager> .Instance.GetGuildID();

        clTempBattlePos[]           tempBattlePosInfo           = SoldierBatch.SOLDIERBATCH.GetTempBattlePosInfo();
        GS_SET_SOLDIER_MILITARY_REQ gS_SET_SOLDIER_MILITARY_REQ = new GS_SET_SOLDIER_MILITARY_REQ();

        gS_SET_SOLDIER_MILITARY_REQ.m_nMode            = 0;
        gS_SET_SOLDIER_MILITARY_REQ.m_nGuildID         = guildID;
        gS_SET_SOLDIER_MILITARY_REQ.m_nMineID          = SoldierBatch.MINE_INFO.m_i64MineID;
        gS_SET_SOLDIER_MILITARY_REQ.m_nMineGrade       = SoldierBatch.MINE_INFO.m_nMineGrade;
        gS_SET_SOLDIER_MILITARY_REQ.nCombinationUnique = NrTSingleton <SolCombination_BatchSelectInfoManager> .Instance.GetUserSelectedUniqeKey(0);

        int num = 0;

        for (int i = 0; i < 5; i++)
        {
            if (tempBattlePosInfo[i].m_nSolID > 0L)
            {
                gS_SET_SOLDIER_MILITARY_REQ.MilitaryInfo[num].SolID = tempBattlePosInfo[i].m_nSolID;
                byte b          = 0;
                byte solPosType = 0;
                SoldierBatch.GetCalcBattlePos((long)tempBattlePosInfo[i].m_nBattlePos, ref b, ref solPosType);
                gS_SET_SOLDIER_MILITARY_REQ.MilitaryInfo[num].SolPosType     = solPosType;
                gS_SET_SOLDIER_MILITARY_REQ.MilitaryInfo[num].MilitaryUnique = 0;
                num++;
            }
        }
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_SET_SOLDIER_MILITARY_REQ, gS_SET_SOLDIER_MILITARY_REQ);
        NrTSingleton <NkClientLogic> .Instance.SetClearMiddleStage();
    }
Ejemplo n.º 7
0
    private bool CheckBattlePos()
    {
        if (this.m_nSelectStage <= 0 || this.m_nSubFloor < 0)
        {
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("614");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        NrMyCharInfo    kMyCharInfo    = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
        BABELTOWER_DATA babelTowerData = NrTSingleton <BabelTowerManager> .Instance.GetBabelTowerData(this.m_nSelectStage, this.m_nSubFloor, this.m_nFloorType);

        if (babelTowerData == null)
        {
            TsLog.LogError("BABELTOWER_DATA == NULL  FloorType ={0} Floor={1} SubFloor={2}", new object[]
            {
                this.m_nFloorType,
                this.m_nSelectStage,
                this.m_nSubFloor
            });
            return(false);
        }
        if (!kMyCharInfo.IsEnableBattleUseActivityPoint(babelTowerData.m_nWillSpend))
        {
            string textFromNotify2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("488");

            Main_UI_SystemMessage.ADDMessage(textFromNotify2, SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        this.m_nMyBatchSolNum = 0;
        byte b;

        if (this.m_BatchUserSol != null)
        {
            b = 0;
            while ((int)b < this.MYSOL_NUM_MAX)
            {
                this.m_BatchUserSol[(int)b].Init();
                b += 1;
            }
        }
        if (this.m_FriendBatch != null)
        {
            for (b = 0; b < 3; b += 1)
            {
                this.m_FriendBatch[(int)b].Init();
            }
        }
        for (b = 1; b <= 20; b += 1)
        {
            if (this.m_nMyBatchSolNum >= this.MYSOL_NUM_MAX)
            {
                break;
            }
            if (b >= 17)
            {
                string value = "0";
                PlayerPrefs.SetString(this.babel_solpos_string + b.ToString(), value);
            }
            else
            {
                string @string = PlayerPrefs.GetString(this.babel_solpos_string + b.ToString());
                if (@string != string.Empty)
                {
                    long          num = long.Parse(@string);
                    NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(num);
                    byte          b2       = 0;
                    byte          nGridPos = 0;
                    SoldierBatch.GetCalcBattlePos((long)b, ref b2, ref nGridPos);
                    if (soldierInfoFromSolID != null)
                    {
                        if (soldierInfoFromSolID.GetSolPosType() == 1 || soldierInfoFromSolID.GetSolPosType() == 0 || soldierInfoFromSolID.GetSolPosType() == 2 || soldierInfoFromSolID.GetSolPosType() == 6)
                        {
                            this.m_BatchUserSol[this.m_nMyBatchSolNum].m_nSolID   = num;
                            this.m_BatchUserSol[this.m_nMyBatchSolNum].m_nGridPos = nGridPos;
                            this.m_BatchUserSol[this.m_nMyBatchSolNum].m_bInjury  = soldierInfoFromSolID.IsInjuryStatus();
                            this.m_nMyBatchSolNum++;
                        }
                    }
                }
            }
        }
        if (this.m_nMyBatchSolNum < this.MYSOL_NUM_MAX)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("610"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return(false);
        }
        List <byte> list = new List <byte>();

        for (b = 0; b < 16; b += 1)
        {
            list.Add(b);
        }
        b = 0;
        while ((int)b < this.m_nMyBatchSolNum)
        {
            list.Remove(this.m_BatchUserSol[(int)b].m_nGridPos);
            b += 1;
        }
        this.m_kFriendSolList.Clear();
        foreach (USER_FRIEND_INFO uSER_FRIEND_INFO in NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_kFriendInfo.GetFriendInfoValues())
        {
            if (uSER_FRIEND_INFO.FriendHelpSolInfo.i64HelpSolID > 0L)
            {
                if (uSER_FRIEND_INFO.ui8HelpUse < 1)
                {
                    this.m_kFriendSolList.Add(uSER_FRIEND_INFO);
                }
            }
        }
        this.m_kFriendSolList.Sort(new Comparison <USER_FRIEND_INFO>(this.CompareFriendSolLevel));
        int num2 = 0;

        for (int i = 0; i < this.m_kFriendSolList.Count; i++)
        {
            if (num2 >= 3)
            {
                break;
            }
            USER_FRIEND_INFO uSER_FRIEND_INFO2 = this.m_kFriendSolList[i];
            int  index = UnityEngine.Random.Range(0, list.Count);
            byte b3    = list[index];
            this.m_FriendBatch[num2].m_nPersonID = uSER_FRIEND_INFO2.nPersonID;
            this.m_FriendBatch[num2].m_nSolID    = uSER_FRIEND_INFO2.FriendHelpSolInfo.i64HelpSolID;
            this.m_FriendBatch[num2].m_nGridPos  = b3;
            this.m_FriendBatch[num2].m_bInjury   = false;
            list.Remove(b3);
            num2++;
        }
        if (NrTSingleton <NkClientLogic> .Instance.IsWorldScene() && NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BABELTOWER_REPEAT_MAIN_DLG) == null)
        {
            NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.BABELTOWER_REPEAT_MAIN_DLG);
        }
        return(true);
    }
Ejemplo n.º 8
0
 public SoldierBatch_Input(SoldierBatch pkPlunderPrepare)
 {
     this.m_SoldierBatch = pkPlunderPrepare;
 }
    private void OnCompleteBatch(object a_oObject)
    {
        byte         nMode        = 0;
        long         nObjBatch    = 0L;
        eSOL_SUBDATA eSOL_SUBDATA = eSOL_SUBDATA.SOL_SUBDATA_STATUSVALUE;

        if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_ATTACK_MAKEUP)
        {
            StageWorld.BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_ATTACK_MAKEUP;
            nMode        = 0;
            eSOL_SUBDATA = eSOL_SUBDATA.SOL_SUBDATA_ATTACK_BATTLEPOS;
        }
        else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_DEFENCE_MAKEUP)
        {
            StageWorld.BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_DEFENCE_MAKEUP;
            nMode        = 1;
            nObjBatch    = SoldierBatch.SOLDIERBATCH.GetObjectDataToSubData().nSubData;
            eSOL_SUBDATA = eSOL_SUBDATA.SOL_SUBDATA_DEFENCE_BATTLEPOS;
        }
        else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PVP_MAKEUP)
        {
            StageWorld.BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_PVP_MAKEUP;
            nMode        = 2;
            eSOL_SUBDATA = eSOL_SUBDATA.SOL_SUBDATA_PVP_BATTLEPOS;
        }
        else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_ATTACK_INFIBATTLE_MAKEUP || SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_DEFENSE_INFIBATTLE_MAKEUP)
        {
            StageWorld.BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_ATTACK_INFIBATTLE_MAKEUP;
            nMode        = 3;
            eSOL_SUBDATA = eSOL_SUBDATA.SOL_SUBDATA_ATTACK_INFIBATTLE;
        }
        else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PRACTICE_INFIBATTLE)
        {
            StageWorld.BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_ATTACK_INFIBATTLE_MAKEUP;
            nMode        = 5;
            eSOL_SUBDATA = eSOL_SUBDATA.SOL_SUBDATA_ATTACK_INFIBATTLE;
        }
        else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PVP_MAKEUP2)
        {
            SoldierBatch.SOLDIERBATCH.SavePvpMakeup2SolInfo();
            NrTSingleton <NkClientLogic> .Instance.SetClearMiddleStage();

            StageWorld.BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_PVP_MAKEUP2;
            nMode = 6;
        }
        GS_PLUNDER_SET_SOLMAKEUP_REQ gS_PLUNDER_SET_SOLMAKEUP_REQ = new GS_PLUNDER_SET_SOLMAKEUP_REQ();

        gS_PLUNDER_SET_SOLMAKEUP_REQ.m_nMode     = nMode;
        gS_PLUNDER_SET_SOLMAKEUP_REQ.m_nObjBatch = nObjBatch;
        if (SoldierBatch.SOLDIER_BATCH_MODE != eSOLDIER_BATCH_MODE.MODE_PVP_MAKEUP2)
        {
            NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

            if (charPersonInfo == null)
            {
                return;
            }
            Dictionary <int, long> dictionary = new Dictionary <int, long>();
            int           num         = 0;
            NrSoldierList soldierList = charPersonInfo.GetSoldierList();
            if (soldierList == null)
            {
                return;
            }
            NkSoldierInfo[] kSolInfo = soldierList.m_kSolInfo;
            for (int i = 0; i < kSolInfo.Length; i++)
            {
                NkSoldierInfo nkSoldierInfo = kSolInfo[i];
                if (nkSoldierInfo.GetSolSubData(eSOL_SUBDATA) > 0L)
                {
                    gS_PLUNDER_SET_SOLMAKEUP_REQ.m_nSolID[num]      = nkSoldierInfo.GetSolID();
                    gS_PLUNDER_SET_SOLMAKEUP_REQ.m_nSolSubData[num] = nkSoldierInfo.GetSolSubData(eSOL_SUBDATA);
                    if (eSOL_SUBDATA == eSOL_SUBDATA.SOL_SUBDATA_PVP_BATTLEPOS)
                    {
                        if (dictionary.ContainsKey(nkSoldierInfo.GetCharKind()))
                        {
                            return;
                        }
                        dictionary.Add(nkSoldierInfo.GetCharKind(), nkSoldierInfo.GetSolID());
                    }
                    num++;
                }
            }
            NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

            if (readySolList == null)
            {
                return;
            }
            foreach (NkSoldierInfo current in readySolList.GetList().Values)
            {
                if (current.GetSolSubData(eSOL_SUBDATA) > 0L)
                {
                    gS_PLUNDER_SET_SOLMAKEUP_REQ.m_nSolID[num]      = current.GetSolID();
                    gS_PLUNDER_SET_SOLMAKEUP_REQ.m_nSolSubData[num] = current.GetSolSubData(eSOL_SUBDATA);
                    if (eSOL_SUBDATA == eSOL_SUBDATA.SOL_SUBDATA_PVP_BATTLEPOS)
                    {
                        if (dictionary.ContainsKey(current.GetCharKind()))
                        {
                            return;
                        }
                        dictionary.Add(current.GetCharKind(), current.GetSolID());
                    }
                    num++;
                }
            }
        }
        else
        {
            Dictionary <int, long> dictionary2 = new Dictionary <int, long>();
            int          num2       = 0;
            NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

            if (myCharInfo == null)
            {
                return;
            }
            for (int j = 0; j < 3; j++)
            {
                long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_COLOSSEUMBATCH1 + j);
                if (charSubData != 0L)
                {
                    SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);
                    sUBDATA_UNION.nSubData = charSubData;
                    int  n32SubData_  = sUBDATA_UNION.n32SubData_0;
                    int  n32SubData_2 = sUBDATA_UNION.n32SubData_1;
                    byte b            = 0;
                    byte b2           = 0;
                    SoldierBatch.GetCalcBattlePos((long)n32SubData_, ref b, ref b2);
                    if (b2 >= 0 && b2 < 9)
                    {
                        if (n32SubData_2 > 0)
                        {
                            if (dictionary2.ContainsKey(n32SubData_2))
                            {
                                return;
                            }
                            dictionary2.Add(n32SubData_2, (long)n32SubData_2);
                            gS_PLUNDER_SET_SOLMAKEUP_REQ.m_nSolID[num2]      = (long)n32SubData_2;
                            gS_PLUNDER_SET_SOLMAKEUP_REQ.m_nSolSubData[num2] = charSubData;
                            num2++;
                        }
                    }
                }
            }
        }
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_PLUNDER_SET_SOLMAKEUP_REQ, gS_PLUNDER_SET_SOLMAKEUP_REQ);
        NrTSingleton <NkClientLogic> .Instance.SetClearMiddleStage();
    }
Ejemplo n.º 10
0
    public override void OnPrepareSceneChange()
    {
        Application.targetFrameRate = -1;
        NrTSingleton <NkCharManager> .Instance.DeleteBattleChar();

        NrLoadPageScreen.DecideLoadingType(Scene.CurScene, this.SceneType());
        NrLoadPageScreen.StepUpMain(1);
        NrLoadPageScreen.SetSkipMainStep(1);
        NrLoadPageScreen.ShowHideLoadingImg(true);
        this.m_SoldierBatch = new SoldierBatch();
        this.m_SoldierBatch.Init();
        this._bTemporalBattleUpdate = true;
        if (TsPlatform.IsLowSystemMemory)
        {
            TsSceneSwitcher.Instance.DeleteScene(TsSceneSwitcher.ESceneType.SoldierBatchScene);
        }
        NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

        if (@char != null)
        {
            @char.m_kCharMove.MoveStop(true, false);
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PLUNDER)
        {
            GS_PLUNDER_MATCH_PLAYER_REQ gS_PLUNDER_MATCH_PLAYER_REQ = new GS_PLUNDER_MATCH_PLAYER_REQ();
            gS_PLUNDER_MATCH_PLAYER_REQ.m_PersonID = charPersonInfo.GetPersonID();
            gS_PLUNDER_MATCH_PLAYER_REQ.m_nMode    = 0;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_PLUNDER_MATCH_PLAYER_REQ, gS_PLUNDER_MATCH_PLAYER_REQ);
        }
        if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_INFIBATTLE)
        {
            int value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_LEVEL);
            if ((int)charPersonInfo.GetLeaderSoldierInfo().GetLevel() < value)
            {
                string empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("129"),
                    "level",
                    value
                });

                Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
            GS_INFIBATTLE_MATCH_REQ obj = new GS_INFIBATTLE_MATCH_REQ();
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_INFIBATTLE_MATCH_REQ, obj);
        }
        if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PRACTICE_INFIBATTLE)
        {
            GS_INFIBATTLE_PRACTICE_START_REQ gS_INFIBATTLE_PRACTICE_START_REQ = new GS_INFIBATTLE_PRACTICE_START_REQ();
            gS_INFIBATTLE_PRACTICE_START_REQ.i64PersonID       = charPersonInfo.GetPersonID();
            gS_INFIBATTLE_PRACTICE_START_REQ.i64TargetPersonID = charPersonInfo.InfiBattlePersonID;
            gS_INFIBATTLE_PRACTICE_START_REQ.i32Rank           = charPersonInfo.InfiBattleRank;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_INFIBATTLE_PRACTICE_START_REQ, gS_INFIBATTLE_PRACTICE_START_REQ);
        }
        GS_CHAR_STATE_SET_REQ gS_CHAR_STATE_SET_REQ = new GS_CHAR_STATE_SET_REQ();

        gS_CHAR_STATE_SET_REQ.nSet = 1;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_CHAR_STATE_SET_REQ, gS_CHAR_STATE_SET_REQ);
        base.ResetCoTasks();
    }