Exemple #1
0
    private void MakeAllSolList()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        NrSoldierList soldierList = charPersonInfo.GetSoldierList();

        NkSoldierInfo[] kSolInfo = soldierList.m_kSolInfo;
        for (int i = 0; i < kSolInfo.Length; i++)
        {
            NkSoldierInfo nkSoldierInfo = kSolInfo[i];
            bool          flag          = true;
            if (this.m_pkParentDlg != null && this.m_pkParentDlg.WindowID == 382)
            {
                flag = false;
            }
            if (!flag || this.loadType == SolMilitarySelectDlg.LoadType.SOLMILITARYGROUP_LEADERCHANGE || nkSoldierInfo.GetFriendPersonID() <= 0L)
            {
                this.AddSolList(nkSoldierInfo, eSOL_POSTYPE.SOLPOS_BATTLE);
            }
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (current.GetSolPosType() != 6)
            {
                this.AddSolList(current, eSOL_POSTYPE.SOLPOS_READY);
            }
        }
    }
Exemple #2
0
    public override bool CheckCondition(long i64Param, ref long i64ParamVal)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return(false);
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        if (readySolList == null)
        {
            return(false);
        }
        int num = 0;

        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierList().GetSoldierInfo(i);
            if (soldierInfo != null)
            {
                if (soldierInfo.GetSolID() != 0L)
                {
                    if (!soldierInfo.IsLeader())
                    {
                        num++;
                    }
                }
            }
        }
        num += readySolList.GetCount();
        return((long)num >= base.GetParamVal());
    }
    private NkSoldierInfo FindSolInfo(long solID)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null || NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null)
        {
            return(null);
        }
        NrSoldierList  soldierList  = charPersonInfo.GetSoldierList();
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo soldierInfo = soldierList.GetSoldierInfo(i);
            if (soldierInfo != null && soldierInfo.IsValid())
            {
                if (solID == soldierInfo.GetSolID())
                {
                    return(soldierInfo);
                }
            }
        }
        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (current != null && current.IsValid())
            {
                if (solID == current.GetSolID())
                {
                    return(current);
                }
            }
        }
        return(null);
    }
Exemple #4
0
    private void MakeReadySolList()
    {
        if (this.SortwithoutHelpsol)
        {
            this.SolSortTypeList.SetVisible(false);
            NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

            NrSoldierList   soldierList = charPersonInfo.GetSoldierList();
            NkSoldierInfo[] kSolInfo    = soldierList.m_kSolInfo;
            for (int i = 0; i < kSolInfo.Length; i++)
            {
                NkSoldierInfo nkSoldierInfo = kSolInfo[i];
                if (!nkSoldierInfo.IsLeader())
                {
                    if (nkSoldierInfo.GetFriendPersonID() <= 0L)
                    {
                        this.AddSolList(nkSoldierInfo, eSOL_POSTYPE.SOLPOS_BATTLE);
                    }
                }
            }
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (!this.SortwithoutHelpsol || current.GetFriendPersonID() <= 0L)
            {
                if (current.GetSolPosType() != 6)
                {
                    this.AddSolList(current, eSOL_POSTYPE.SOLPOS_READY);
                }
            }
        }
    }
Exemple #5
0
    public bool FindSolInfo(int i32CharKind)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null || NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null)
        {
            return(false);
        }
        NrSoldierList  soldierList  = charPersonInfo.GetSoldierList();
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo soldierInfo = soldierList.GetSoldierInfo(i);
            if (soldierInfo != null && soldierInfo.IsValid())
            {
                if (soldierInfo.GetCharKind() == i32CharKind)
                {
                    return(true);
                }
            }
        }
        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (current != null && current.IsValid())
            {
                if (current.GetCharKind() == i32CharKind)
                {
                    return(true);
                }
            }
        }
        return(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetWarehouseSolList().GetSolWarehouseCharKind(i32CharKind));
    }
    private void OnInfiStartMatch(object a_oObject)
    {
        if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_INFIBATTLE || SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PRACTICE_INFIBATTLE)
        {
            GS_INFIBATTLE_START_REQ gS_INFIBATTLE_START_REQ = new GS_INFIBATTLE_START_REQ();
            int num = 0;
            NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

            if (charPersonInfo == null)
            {
                return;
            }
            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.SOL_SUBDATA_ATTACK_INFIBATTLE) > 0L)
                {
                    gS_INFIBATTLE_START_REQ.i64SolID[num]     = nkSoldierInfo.GetSolID();
                    gS_INFIBATTLE_START_REQ.i64BattlePos[num] = nkSoldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_ATTACK_INFIBATTLE);
                    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.SOL_SUBDATA_ATTACK_INFIBATTLE) > 0L)
                {
                    gS_INFIBATTLE_START_REQ.i64SolID[num]     = current.GetSolID();
                    gS_INFIBATTLE_START_REQ.i64BattlePos[num] = current.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_ATTACK_INFIBATTLE);
                    num++;
                }
            }
            if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PRACTICE_INFIBATTLE)
            {
                gS_INFIBATTLE_START_REQ.i8PracticeBattleMode = 1;
            }
            else
            {
                gS_INFIBATTLE_START_REQ.i8PracticeBattleMode = 0;
            }
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_INFIBATTLE_START_REQ, gS_INFIBATTLE_START_REQ);
            if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.PLUNDERSOLLIST_DLG))
            {
                NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.PLUNDERSOLLIST_DLG);
            }
            TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "START", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
        }
    }
    private void CollectSolInfo()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null || NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null)
        {
            return;
        }
        NrSoldierList  soldierList  = charPersonInfo.GetSoldierList();
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        if (!ExplorationDlg.m_bSortSolInfo)
        {
            for (int i = NrTSingleton <ExplorationManager> .Instance.GetSolInfo().Count; i < 6; i++)
            {
                NkSoldierInfo soldierInfo = soldierList.GetSoldierInfo(i);
                if (this.IsValidSol(soldierInfo, true))
                {
                    NrTSingleton <ExplorationManager> .Instance.AddSolInfo(soldierInfo);
                }
            }
            foreach (NkSoldierInfo current in readySolList.GetList().Values)
            {
                if (this.IsValidSol(current, true))
                {
                    if (6 <= NrTSingleton <ExplorationManager> .Instance.GetSolInfo().Count)
                    {
                        break;
                    }
                    NrTSingleton <ExplorationManager> .Instance.AddSolInfo(current);
                }
            }
            NrTSingleton <ExplorationManager> .Instance.SortSolInfo();

            if (6 < NrTSingleton <ExplorationManager> .Instance.GetSolInfo().Count)
            {
                NrTSingleton <ExplorationManager> .Instance.GetSolInfo().RemoveRange(6, NrTSingleton <ExplorationManager> .Instance.GetSolInfo().Count - 6);
            }
            ExplorationDlg.m_bSortSolInfo = true;
        }
        else
        {
            for (int j = 0; j < NrTSingleton <ExplorationManager> .Instance.GetSolInfo().Count; j++)
            {
                long solID = NrTSingleton <ExplorationManager> .Instance.GetSolID(j);

                NkSoldierInfo pkSolinfo = this.FindSolInfo(solID);
                if (!this.IsValidSol(pkSolinfo, false))
                {
                    NrTSingleton <ExplorationManager> .Instance.RemoveSolInfo(solID);
                }
            }
        }
    }
    public void CheckInjurySoldierList()
    {
        List <NkSoldierInfo> list           = new List <NkSoldierInfo>();
        List <NkSoldierInfo> list2          = new List <NkSoldierInfo>();
        NrPersonInfoUser     charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null || NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null)
        {
            return;
        }
        NrSoldierList  soldierList  = charPersonInfo.GetSoldierList();
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        list.Clear();
        list2.Clear();
        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo soldierInfo = soldierList.GetSoldierInfo(i);
            this.AddSolList(soldierInfo, eSOL_POSTYPE.SOLPOS_BATTLE, list);
        }
        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            this.AddSolList(current, eSOL_POSTYPE.SOLPOS_READY, list2);
        }
        int num = 0;

        for (int j = 0; j < list.Count; j++)
        {
            if (list[j] != null)
            {
                if (list[j].IsSolStatus(2))
                {
                    num++;
                }
            }
        }
        this.nInjuryBattleSoldierCount = num;
        num = 0;
        for (int k = 0; k < list2.Count; k++)
        {
            if (list2[k] != null)
            {
                if (list2[k].IsSolStatus(2))
                {
                    if (list2[k].IsInjuryStatus())
                    {
                        num++;
                    }
                }
            }
        }
        this.nInjuryReadySoldierCount = num;
        this.nInjurySoldierCount      = this.nInjuryBattleSoldierCount + this.nInjuryReadySoldierCount;
    }
    public NkSoldierInfo GetSoldierInfo(long SoldID)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        NrSoldierList soldierList   = charPersonInfo.GetSoldierList();
        NkSoldierInfo nkSoldierInfo = soldierList.GetSoldierInfoBySolID(SoldID);

        if (nkSoldierInfo == null)
        {
            nkSoldierInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySoldierInfoBySolID(SoldID);
        }
        return(nkSoldierInfo);
    }
Exemple #10
0
    public bool DoNotPlay()
    {
        if (NrTSingleton <NewExplorationManager> .Instance.GetPlayState() == eNEWEXPLORATION_PLAYSTATE.eNEWEXPLORATION_PLAYSTATE_NONE)
        {
            return(true);
        }
        if (this.GetBossDamage() > 0)
        {
            return(false);
        }
        NewExplorationManager.CHAR_DETAIL_NEWEXPLORATION charDetatilData = this.GetCharDetatilData();
        if ((int)charDetatilData.bCurFloor > 0 || (int)charDetatilData.bCurSubFloor > 0)
        {
            return(false);
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return(false);
        }
        NrSoldierList soldierList = charPersonInfo.GetSoldierList();

        if (soldierList == null)
        {
            return(false);
        }
        NkSoldierInfo[] kSolInfo = soldierList.m_kSolInfo;
        for (int i = 0; i < kSolInfo.Length; i++)
        {
            NkSoldierInfo nkSoldierInfo = kSolInfo[i];
            if (nkSoldierInfo.IsAtbCommonFlag(16L))
            {
                return(false);
            }
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        if (readySolList == null)
        {
            return(false);
        }
        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (current.IsAtbCommonFlag(16L))
            {
                return(false);
            }
        }
        return(true);
    }
Exemple #11
0
    public override string GetConditionText(long i64ParamVal)
    {
        string textFromQuest_Code = NrTSingleton <NrTextMgr> .Instance.GetTextFromQuest_Code(this.m_szTextKey);

        string           empty          = string.Empty;
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return(string.Empty);
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        if (readySolList == null)
        {
            return(string.Empty);
        }
        int num = 0;

        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierList().GetSoldierInfo(i);
            if (soldierInfo != null)
            {
                if (soldierInfo.GetSolID() != 0L)
                {
                    if (!soldierInfo.IsLeader())
                    {
                        num++;
                    }
                }
            }
        }
        num += readySolList.GetCount();
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            textFromQuest_Code,
            "count1",
            num,
            "count2",
            base.GetParamVal()
        });

        return(empty);
    }
    public void CheckInjurySoldier()
    {
        this.m_nInjurySoldirtCount = 0;
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        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.GetSolID() > 0L)
            {
                if (nkSoldierInfo.IsInjuryStatus())
                {
                    this.m_nInjurySoldirtCount++;
                }
            }
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        if (readySolList == null)
        {
            return;
        }
        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (current.GetSolID() > 0L)
            {
                if (current.IsInjuryStatus())
                {
                    this.m_nInjurySoldirtCount++;
                }
            }
        }
    }
    public int GetPlunderAttackPosSolNum(eSOL_SUBDATA eSetMode)
    {
        int num = 0;
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return(num);
        }
        NrSoldierList soldierList = charPersonInfo.GetSoldierList();

        if (soldierList == null)
        {
            return(num);
        }
        NkSoldierInfo[] kSolInfo = soldierList.m_kSolInfo;
        for (int i = 0; i < kSolInfo.Length; i++)
        {
            NkSoldierInfo nkSoldierInfo = kSolInfo[i];
            if (nkSoldierInfo.GetSolSubData(eSetMode) > 0L)
            {
                num++;
            }
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        if (readySolList == null)
        {
            return(num);
        }
        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (current.GetSolSubData(eSetMode) > 0L)
            {
                num++;
            }
        }
        return(num);
    }
    public void SetSolList()
    {
        this.m_nlSelectSoldierList.Clear();
        this.m_kSolList.Clear();
        List <int> list = new List <int>();

        list.Clear();
        eSOL_SUBDATA     eType          = eSOL_SUBDATA.SOL_SUBDATA_NONE;
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        NrSoldierList soldierList = charPersonInfo.GetSoldierList();

        if (soldierList == null)
        {
            return;
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        if (readySolList == null)
        {
            return;
        }
        if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_COLOSSEUM)
        {
            eType = eSOL_SUBDATA.SOL_SUBDATA_PVP_BATTLEPOS;
            NkSoldierInfo[] kSolInfo = soldierList.m_kSolInfo;
            for (int i = 0; i < kSolInfo.Length; i++)
            {
                NkSoldierInfo nkSoldierInfo = kSolInfo[i];
                if (nkSoldierInfo.GetSolID() > 0L)
                {
                    if (nkSoldierInfo.GetSolSubData(eType) > 0L && !list.Contains(nkSoldierInfo.GetCharKind()))
                    {
                        list.Add(nkSoldierInfo.GetCharKind());
                    }
                }
            }
            foreach (NkSoldierInfo current in readySolList.GetList().Values)
            {
                if (current.GetSolID() > 0L)
                {
                    if (current.GetSolSubData(eType) > 0L && !list.Contains(current.GetCharKind()))
                    {
                        list.Add(current.GetCharKind());
                    }
                }
            }
            NkSoldierInfo[] kSolInfo2 = soldierList.m_kSolInfo;
            for (int j = 0; j < kSolInfo2.Length; j++)
            {
                NkSoldierInfo nkSoldierInfo2 = kSolInfo2[j];
                if (nkSoldierInfo2.GetSolID() > 0L)
                {
                    if (!list.Contains(nkSoldierInfo2.GetCharKind()))
                    {
                        if (nkSoldierInfo2.GetSolSubData(eType) <= 0L)
                        {
                            this.m_kSolList.Add(nkSoldierInfo2);
                        }
                    }
                }
            }
            foreach (NkSoldierInfo current2 in readySolList.GetList().Values)
            {
                if (current2.GetSolID() > 0L)
                {
                    if (!list.Contains(current2.GetCharKind()))
                    {
                        if (current2.GetSolPosType() != 2)
                        {
                            if (current2.GetSolPosType() != 6)
                            {
                                if (current2.GetSolSubData(eType) <= 0L)
                                {
                                    this.m_kSolList.Add(current2);
                                }
                            }
                        }
                    }
                }
            }
        }
        else if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_BABELTOWER || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_GUILD_BOSS || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_BOUNTYHUNT || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_DAILYDUNGEON)
        {
            List <int> babelCharKind = Battle.BATTLE.BabelCharKind;
            if (babelCharKind == null)
            {
                return;
            }
            foreach (int current3 in babelCharKind)
            {
                list.Add(current3);
            }
            NkSoldierInfo[] kSolInfo3 = soldierList.m_kSolInfo;
            for (int k = 0; k < kSolInfo3.Length; k++)
            {
                NkSoldierInfo nkSoldierInfo3 = kSolInfo3[k];
                if (nkSoldierInfo3.GetSolID() > 0L)
                {
                    if (!list.Contains(nkSoldierInfo3.GetCharKind()))
                    {
                        this.m_kSolList.Add(nkSoldierInfo3);
                    }
                }
            }
            foreach (NkSoldierInfo current4 in readySolList.GetList().Values)
            {
                if (current4.GetSolID() > 0L)
                {
                    if (!list.Contains(current4.GetCharKind()))
                    {
                        if (current4.GetSolPosType() != 6)
                        {
                            this.m_kSolList.Add(current4);
                        }
                    }
                }
            }
        }
        else if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_MYTHRAID)
        {
            List <long> babelBattleSolList = Battle.BATTLE.BabelBattleSolList;
            if (babelBattleSolList == null)
            {
                return;
            }
            NkSoldierInfo[] kSolInfo4 = soldierList.m_kSolInfo;
            for (int l = 0; l < kSolInfo4.Length; l++)
            {
                NkSoldierInfo nkSoldierInfo4 = kSolInfo4[l];
                if (nkSoldierInfo4.GetSolID() > 0L)
                {
                    if (!babelBattleSolList.Contains(nkSoldierInfo4.GetSolID()))
                    {
                        if (!NrTSingleton <NkBattleCharManager> .Instance.IsSameKindSolInBattle(nkSoldierInfo4.GetCharKind()))
                        {
                            this.m_kSolList.Add(nkSoldierInfo4);
                        }
                    }
                }
            }
            foreach (NkSoldierInfo current5 in readySolList.GetList().Values)
            {
                if (current5.GetSolID() > 0L)
                {
                    if (!babelBattleSolList.Contains(current5.GetSolID()))
                    {
                        if (!NrTSingleton <NkBattleCharManager> .Instance.IsSameKindSolInBattle(current5.GetCharKind()))
                        {
                            if (current5.GetSolPosType() != 6)
                            {
                                this.m_kSolList.Add(current5);
                            }
                        }
                    }
                }
            }
        }
        else
        {
            NkSoldierInfo[] kSolInfo5 = soldierList.m_kSolInfo;
            for (int m = 0; m < kSolInfo5.Length; m++)
            {
                NkSoldierInfo nkSoldierInfo5 = kSolInfo5[m];
                if (nkSoldierInfo5.GetSolID() > 0L)
                {
                    list.Add(nkSoldierInfo5.GetCharKind());
                }
            }
            foreach (NkSoldierInfo current6 in readySolList.GetList().Values)
            {
                if (!current6.IsInjuryStatus())
                {
                    if (current6.GetSolID() > 0L)
                    {
                        if (current6.GetSolPosType() != 6)
                        {
                            if (!list.Contains(current6.GetCharKind()))
                            {
                                this.m_kSolList.Add(current6);
                            }
                        }
                    }
                }
            }
        }
        this.m_kSolList.Sort(new Comparison <NkSoldierInfo>(this.CompareCombatPower));
        foreach (NkSoldierInfo current7 in this.m_kSolList)
        {
            if (!current7.IsInjuryStatus())
            {
                if (current7.GetSolID() > 0L)
                {
                    if (!this.IsMyMainHeroKind(current7.GetCharKind()))
                    {
                        if (!current7.IsSolStatus(4) || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_MYTHRAID)
                        {
                            NewListItem newListItem = new NewListItem(this.m_nlSelectSoldierList.ColumnNum, true, string.Empty);
                            newListItem.Data = current7.GetSolID();
                            NkListSolInfo nkListSolInfo = new NkListSolInfo();
                            nkListSolInfo.SolCharKind            = current7.GetCharKind();
                            nkListSolInfo.SolGrade               = (int)current7.GetGrade();
                            nkListSolInfo.SolLevel               = current7.GetLevel();
                            nkListSolInfo.FightPower             = current7.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_FIGHTINGPOWER);
                            nkListSolInfo.ShowLevel              = false;
                            nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(current7);

                            if (NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(current7.GetCharKind()) != null)
                            {
                                nkListSolInfo.ShowCombat = true;
                                EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(current7.GetCharKind(), current7.GetGrade());

                                if (eventHeroCharCode != null)
                                {
                                    newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
                                }
                                else
                                {
                                    UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(current7.GetCharKind(), (int)current7.GetGrade());

                                    if (legendFrame != null)
                                    {
                                        newListItem.SetListItemData(0, legendFrame, null, null, null);
                                    }
                                    else
                                    {
                                        newListItem.SetListItemData(0, true);
                                    }
                                }
                                newListItem.SetListItemData(1, nkListSolInfo, current7, null, null);
                                string empty = string.Empty;
                                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                                {
                                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1435"),
                                    "charname",
                                    current7.GetName()
                                });

                                newListItem.SetListItemData(2, empty, null, null, null);
                                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                                {
                                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1031"),
                                    "count",
                                    current7.GetLevel()
                                });

                                newListItem.SetListItemData(3, empty, null, null, null);
                                this.m_nlSelectSoldierList.Add(newListItem);
                            }
                        }
                    }
                }
            }
        }
        this.m_nlSelectSoldierList.RepositionItems();
    }
    public static List <NkSoldierInfo> GetSolList(eSOLDIER_BATCH_MODE eSoldierBatchMode)
    {
        List <NkSoldierInfo> list  = new List <NkSoldierInfo>();
        List <NkSoldierInfo> list2 = new List <NkSoldierInfo>();
        List <NkSoldierInfo> list3 = new List <NkSoldierInfo>();
        int num = 0;
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return(new List <NkSoldierInfo>());
        }
        NrSoldierList soldierList = charPersonInfo.GetSoldierList();

        if (soldierList == null)
        {
            return(new List <NkSoldierInfo>());
        }
        NkSoldierInfo[] kSolInfo = soldierList.m_kSolInfo;
        for (int i = 0; i < kSolInfo.Length; i++)
        {
            NkSoldierInfo nkSoldierInfo = kSolInfo[i];
            if (eSoldierBatchMode == eSOLDIER_BATCH_MODE.MODE_MINE_MAKEUP || eSoldierBatchMode == eSOLDIER_BATCH_MODE.MODE_EXPEDITION_MAKEUP)
            {
                break;
            }
            if (!SoldierBatch_SolList.IsNotExcludeSol(nkSoldierInfo, eSoldierBatchMode))
            {
                if (nkSoldierInfo.IsLeader())
                {
                    list.Add(nkSoldierInfo);
                }
                else
                {
                    NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(nkSoldierInfo.GetCharKind());

                    if (charKindInfo != null && nkSoldierInfo.GetLevel() >= 50)
                    {
                        list2.Add(nkSoldierInfo);
                    }
                    else
                    {
                        list3.Add(nkSoldierInfo);
                    }
                }
            }
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        if (readySolList == null)
        {
            return(new List <NkSoldierInfo>());
        }
        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (!SoldierBatch_SolList.IsNotExcludeSol(current, eSoldierBatchMode))
            {
                if (current.IsLeader())
                {
                    list.Add(current);
                }
                else
                {
                    NrCharKindInfo charKindInfo2 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(current.GetCharKind());

                    if (charKindInfo2 != null && current.GetLevel() >= 50)
                    {
                        list2.Add(current);
                    }
                    else
                    {
                        list3.Add(current);
                    }
                }
                num++;
            }
        }
        list2.Sort(new Comparison <NkSoldierInfo>(SoldierBatch_SolList.ComparePower));
        list3.Sort(new Comparison <NkSoldierInfo>(SoldierBatch_SolList.CompareLevel));
        for (int j = 0; j < list2.Count; j++)
        {
            list.Add(list2[j]);
        }
        for (int k = 0; k < list3.Count; k++)
        {
            list.Add(list3[k]);
        }
        return(list);
    }
    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();
    }
    private void OnStartMatch(object a_oObject)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_PLUNDER_DELAYTIME);
        long curTime     = PublicMethod.GetCurTime();
        long num         = charSubData - curTime;

        if (num > 0L)
        {
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("136"),
                "timestring",
                PublicMethod.ConvertTime(num)
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        GS_PLUNDER_BATTLE_START_REQ gS_PLUNDER_BATTLE_START_REQ = new GS_PLUNDER_BATTLE_START_REQ();
        int           num2        = 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.SOL_SUBDATA_ATTACK_BATTLEPOS) > 0L)
            {
                gS_PLUNDER_BATTLE_START_REQ.m_nSolID[num2]      = nkSoldierInfo.GetSolID();
                gS_PLUNDER_BATTLE_START_REQ.m_nSolSubData[num2] = nkSoldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_ATTACK_BATTLEPOS);
                num2++;
            }
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        if (readySolList == null)
        {
            return;
        }
        foreach (NkSoldierInfo current in readySolList.GetList().Values)
        {
            if (current.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_ATTACK_BATTLEPOS) > 0L)
            {
                gS_PLUNDER_BATTLE_START_REQ.m_nSolID[num2]      = current.GetSolID();
                gS_PLUNDER_BATTLE_START_REQ.m_nSolSubData[num2] = current.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_ATTACK_BATTLEPOS);
                num2++;
            }
        }
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_PLUNDER_BATTLE_START_REQ, gS_PLUNDER_BATTLE_START_REQ);
        if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.PLUNDERSOLLIST_DLG))
        {
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.PLUNDERSOLLIST_DLG);
        }
        TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "START", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
    }