示例#1
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));
    }
示例#2
0
    private void MessageBox_PreviewHero(object a_oObject)
    {
        NkSoldierInfo nkSoldierInfo = (NkSoldierInfo)a_oObject;

        if (nkSoldierInfo == null)
        {
            return;
        }
        if (nkSoldierInfo.GetCharKindInfo() == null)
        {
            return;
        }
        GS_PREVIEW_HERO_START_REQ gS_PREVIEW_HERO_START_REQ = new GS_PREVIEW_HERO_START_REQ();

        gS_PREVIEW_HERO_START_REQ.i32CharKind      = nkSoldierInfo.GetCharKind();
        gS_PREVIEW_HERO_START_REQ.i32CostumeUnique = (int)nkSoldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_COSTUME);
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_PREVIEW_HERO_START_REQ, gS_PREVIEW_HERO_START_REQ);
        SolMilitaryGroupDlg solMilitaryGroupDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLMILITARYGROUP_DLG) as SolMilitaryGroupDlg;

        if (solMilitaryGroupDlg != null)
        {
            solMilitaryGroupDlg.ChangeSceneDestory = false;
            solMilitaryGroupDlg.Hide();
            NrTSingleton <NkClientLogic> .Instance.GidPrivewHero = 82;
        }
    }
 private void InitCostumeRoom(NkSoldierInfo soldierInfo)
 {
     if (soldierInfo == null)
     {
         return;
     }
     this._costumeRoomDlg._variables._sameKindSolCheckBox.SetCheckState(1);
     this._costumeRoomDlg.InitCostumeRoom(soldierInfo.GetCharKind(), null);
 }
示例#4
0
    public int GetKind(int solindex)
    {
        NkSoldierInfo soldierInfo = this.GetSoldierInfo(solindex);

        if (soldierInfo != null)
        {
            return(soldierInfo.GetCharKind());
        }
        return(0);
    }
    public override bool CheckGameGuideOnce()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo != null)
        {
            for (int i = 0; i < 6; i++)
            {
                NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i);
                if (soldierInfo != null)
                {
                    if (soldierInfo.GetSolID() != 0L)
                    {
                        if (soldierInfo.GetCharKindInfo() != null)
                        {
                            if ("2070" == soldierInfo.GetCharKindInfo().GetCHARKIND_INFO().SoldierSpec1)
                            {
                                return(false);
                            }
                            if (soldierInfo.GetCharKind() == 6)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
            NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

            if (readySolList == null)
            {
                return(false);
            }
            int num = -1;
            foreach (NkSoldierInfo current in readySolList.GetList().Values)
            {
                if (current != null)
                {
                    if (current.GetSolID() != 0L)
                    {
                        if ("2070" == current.GetCharKindInfo().GetCHARKIND_INFO().SoldierSpec1&& num < (int)current.GetGrade())
                        {
                            num = (int)current.GetGrade();
                            this.m_nCharKind = current.GetCharKind();
                        }
                    }
                }
            }
            if (0 < this.m_nCharKind)
            {
                return(true);
            }
        }
        return(false);
    }
示例#6
0
    public List <int> GetSolKindList()
    {
        if (this.m_kSoldierList == null)
        {
            return(null);
        }
        List <int> list = new List <int>();

        NkSoldierInfo[] kSolInfo = this.m_kSoldierList.m_kSolInfo;
        for (int i = 0; i < kSolInfo.Length; i++)
        {
            NkSoldierInfo nkSoldierInfo = kSolInfo[i];
            if (nkSoldierInfo == null)
            {
                Debug.LogError("ERROR, NrPersonInfoBase.cs. GetSolKindList(), soliderInfo is Null");
            }
            else if (!list.Contains(nkSoldierInfo.GetCharKind()))
            {
                list.Add(nkSoldierInfo.GetCharKind());
            }
        }
        return(list);
    }
示例#7
0
        private void SetPortrait(ref NewListItem item, NkSoldierInfo solInfo)
        {
            if (item == null || solInfo == null)
            {
                return;
            }
            Texture2D portraitLeaderSol = this.GetPortraitLeaderSol(solInfo.GetCharKind());

            if (portraitLeaderSol != null)
            {
                item.SetListItemData(1, portraitLeaderSol, solInfo, solInfo.GetLevel(), new EZValueChangedDelegate(this._myCharListSetter._callbackProcessor.OnClickListUpBox), null);
                return;
            }
            NkListSolInfo nkListSolInfo = new NkListSolInfo();

            nkListSolInfo.SolCharKind            = solInfo.GetCharKind();
            nkListSolInfo.SolGrade               = (int)solInfo.GetGrade();
            nkListSolInfo.SolLevel               = solInfo.GetLevel();
            nkListSolInfo.FightPower             = solInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_FIGHTINGPOWER);
            nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath((int)solInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_COSTUME));

            if (NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(solInfo.GetCharKind()) == null)
            {
                return;
            }
            if (50 <= solInfo.GetLevel())
            {
                nkListSolInfo.ShowCombat = true;
                nkListSolInfo.ShowLevel  = false;
            }
            else
            {
                nkListSolInfo.ShowCombat = false;
                nkListSolInfo.ShowLevel  = true;
            }
            item.SetListItemData(1, nkListSolInfo, solInfo, new EZValueChangedDelegate(this._myCharListSetter._callbackProcessor.OnClickListUpBox), null);
        }
 private NkListSolInfo GetListSolInfo(NkSoldierInfo solInfo)
 {
     if (solInfo == null)
     {
         return(null);
     }
     return(new NkListSolInfo
     {
         ShowCombat = false,
         ShowLevel = false,
         ShowGrade = true,
         SolGrade = (int)solInfo.GetGrade(),
         SolCharKind = solInfo.GetCharKind(),
         SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(solInfo)
     });
 }
示例#9
0
 public void SetInfo(NkSoldierInfo solInfo)
 {
     this.m_nCharKind      = 0;
     this.m_iLevel         = 0;
     this.m_nGrade         = 0;
     this.m_nCostumeUnique = 0;
     if (solInfo == null)
     {
         return;
     }
     this.m_nCharKind      = solInfo.GetCharKind();
     this.m_iLevel         = solInfo.GetLevel();
     this.m_nGrade         = (int)solInfo.GetGrade();
     this.m_nCostumeUnique = (int)solInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_COSTUME);
     this.SetImage();
     this.SetMessage();
 }
示例#10
0
    private void SetCharInfo()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo != null)
        {
            NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(0);
            if (soldierInfo != null)
            {
                this.m_dtCharImg.SetUVMask(new Rect(4f / this.TEX_SIZE, 0f, 504f / this.TEX_SIZE, 448f / this.TEX_SIZE));
                this.m_dtCharImg.SetTexture(eCharImageType.LARGE, soldierInfo.GetCharKind(), (int)soldierInfo.GetGrade(), string.Empty);
                this.m_lbCharName.Text = string.Format("Lv.{0} {1}", soldierInfo.GetLevel(), soldierInfo.GetName());
                if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.IntroMsg == string.Empty)
                {
                    string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("124");

                    string text = string.Empty;
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                    {
                        textFromInterface,
                        "username",
                        charPersonInfo.GetCharName()
                    });

                    if ("true" == MsgHandler.HandleReturn <string>("ReservedWordManagerIsUse", new object[0]))
                    {
                        text = MsgHandler.HandleReturn <string>("ReservedWordManagerReplaceWord", new object[]
                        {
                            text
                        });
                    }
                    if (text.Contains("*"))
                    {
                        Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("797"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                    }
                    this.m_taIntroMsg.SetText(text);
                }
                else
                {
                    this.m_taIntroMsg.SetText(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.IntroMsg);
                }
            }
        }
    }
    private void OnClickMythTime(IUIObject obj)
    {
        if (obj == null)
        {
            return;
        }
        NkSoldierInfo soldierInfo = this.GetSoldierInfo(this.m_i64BaseSolID);

        if (soldierInfo == null)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("508"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        Myth_Evolution_Time_DLG myth_Evolution_Time_DLG = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MYTH_EVOLUTION_TIME_DLG) as Myth_Evolution_Time_DLG;

        if (myth_Evolution_Time_DLG != null)
        {
            myth_Evolution_Time_DLG.InitSet(MYTH_TYPE.MYTHTYPE_EVOLUTION, soldierInfo.GetCharKind(), soldierInfo.GetSolID());
        }
    }
示例#12
0
    public override bool CheckCondition(long i64Param, ref long i64ParamVal)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return(false);
        }
        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo nkSoldierInfo = charPersonInfo.m_kSoldierList.m_kSolInfo[i];
            if (nkSoldierInfo.IsValid())
            {
                if (nkSoldierInfo.GetSolPosType() == 1 && (long)nkSoldierInfo.GetCharKind() == base.GetParam())
                {
                    return(true);
                }
            }
        }
        return(false);
    }
    public List <int> GetBatchedSolKindList()
    {
        List <int>       list           = new List <int>();
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        for (int i = 1; i <= 20; i++)
        {
            string @string = PlayerPrefs.GetString(this.babel_solpos_string + i.ToString());
            if (!string.IsNullOrEmpty(@string))
            {
                long          solid = long.Parse(@string);
                NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(solid);
                if (soldierInfoFromSolID != null)
                {
                    Debug.Log("BabelBatchedSolKindList : " + soldierInfoFromSolID.GetName());
                    list.Add(soldierInfoFromSolID.GetCharKind());
                }
            }
        }
        return(list);
    }
示例#14
0
    private void ClickConfirm_SolMilitaryGroup_LeaderChange(NkSoldierInfo pkSolinfo)
    {
        long num = (long)((int)NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_FACE_SOLINDEX));

        if (num == pkSolinfo.GetSolID())
        {
            return;
        }
        SolMilitaryGroupDlg solMilitaryGroupDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLMILITARYGROUP_DLG) as SolMilitaryGroupDlg;

        if (solMilitaryGroupDlg == null)
        {
            return;
        }
        GS_CHARACTER_SUBDATA_REQ gS_CHARACTER_SUBDATA_REQ = new GS_CHARACTER_SUBDATA_REQ();

        gS_CHARACTER_SUBDATA_REQ.kCharSubData.nSubDataType  = 0;
        gS_CHARACTER_SUBDATA_REQ.kCharSubData.nSubDataValue = pkSolinfo.GetSolID();
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_CHARACTER_SUBDATA_REQ, gS_CHARACTER_SUBDATA_REQ);
        solMilitaryGroupDlg.SetLaderChangeInfo(pkSolinfo.GetCharKind());
    }
示例#15
0
    public void OnClickRequestEmergency(IUIObject obj)
    {
        Button button = obj as Button;

        if (button == null)
        {
            return;
        }
        NkSoldierInfo nkSoldierInfo = button.data as NkSoldierInfo;

        if (nkSoldierInfo == null)
        {
            return;
        }
        int charKind = nkSoldierInfo.GetCharKind();
        GS_BATTLE_CHANGE_SOLDIER_REQ gS_BATTLE_CHANGE_SOLDIER_REQ = new GS_BATTLE_CHANGE_SOLDIER_REQ();

        gS_BATTLE_CHANGE_SOLDIER_REQ.i32CharKind = charKind;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BATTLE_CHANGE_SOLDIER_REQ, gS_BATTLE_CHANGE_SOLDIER_REQ);
        this.Close();
    }
    private string SetFaceImageKey(NkSoldierInfo kSol)
    {
        string text = string.Empty;

        if (kSol == null)
        {
            return(text);
        }
        NrCharKindInfo charKindInfo = kSol.GetCharKindInfo();

        if (charKindInfo == null)
        {
            TsLog.LogError("SetImage SolID ={0} Not Found Kind", new object[]
            {
                kSol.GetCharKind()
            });
            return(text);
        }
        int    costumeUnique       = (int)kSol.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_COSTUME);
        string costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(costumeUnique);

        string portraitFile = charKindInfo.GetPortraitFile1((int)kSol.GetGrade(), costumePortraitPath);

        if (UIDataManager.IsUse256Texture())
        {
            text = portraitFile + "_256";
        }
        else
        {
            text = portraitFile + "_512";
        }
        if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(text))
        {
            NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(text, eCharImageType.LARGE, new PostProcPerItem(this.SetBundleImage));
        }
        return(text);
    }
示例#17
0
    public void SetData(byte bPreGrade, int lPreLevel, long lExp, NkSoldierInfo kSolInfo, long nAddEvolutionExp, long nMaxLvEvolution)
    {
        this.m_TargetSolInfo = kSolInfo;
        if (kSolInfo != null)
        {
            string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1731");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[]
            {
                textFromInterface,
                "count",
                lExp
            });

            this.lbExp.SetText(textFromInterface);
            this.lbName.SetText(kSolInfo.GetName());
            if (!NrTSingleton <ContentsLimitManager> .Instance.IsReincarnation())
            {
                if (kSolInfo.IsLeader())
                {
                    this.SolRank.Visible = false;
                }
                else
                {
                    UIBaseInfoLoader solLargeGradeImg = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade());

                    if (solLargeGradeImg != null)
                    {
                        if (0 < NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade()))
                        {
                            this.SolRank.SetSize(solLargeGradeImg.UVs.width, solLargeGradeImg.UVs.height);
                        }
                        this.SolRank.SetTexture(solLargeGradeImg);
                    }
                }
            }
            else
            {
                UIBaseInfoLoader solLargeGradeImg2 = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade());

                if (solLargeGradeImg2 != null)
                {
                    if (0 < NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade()))
                    {
                        this.SolRank.SetSize(solLargeGradeImg2.UVs.width, solLargeGradeImg2.UVs.height);
                    }
                    this.SolRank.SetTexture(solLargeGradeImg2);
                }
            }
            int costumeUnique = (int)kSolInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_COSTUME);
            this.dtImg.SetTexture(eCharImageType.LARGE, kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade(), NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(costumeUnique));
            long  num  = kSolInfo.GetNextExp() - kSolInfo.GetCurBaseExp();
            float num2 = ((float)num - (float)kSolInfo.GetRemainExp()) / (float)num;
            if (num2 > 1f)
            {
                num2 = 1f;
            }
            if (kSolInfo.IsMaxLevel())
            {
                string textFromInterface2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("286");

                this.lbExpRate.SetText(textFromInterface2);
                num2 = 1f;
            }
            else
            {
                this.lbExpRate.SetText(string.Format("{0:F2}%", num2 * 100f));
            }
            this.pbGage.Value = num2;
            BASE_SOLGRADEINFO cHARKIND_SOLGRADEINFO  = kSolInfo.GetCharKindInfo().GetCHARKIND_SOLGRADEINFO((int)kSolInfo.GetGrade());
            BASE_SOLGRADEINFO cHARKIND_SOLGRADEINFO2 = kSolInfo.GetCharKindInfo().GetCHARKIND_SOLGRADEINFO((int)bPreGrade);
            if (cHARKIND_SOLGRADEINFO != null && cHARKIND_SOLGRADEINFO2 != null)
            {
                int  level = (int)kSolInfo.GetLevel();
                bool flag  = lPreLevel != level;
                this.lbLevel[1].SetText(lPreLevel.ToString());
                this.lbLevel[2].Visible = flag;
                this.lbLevel[3].Visible = flag;
                this.lbLevel[3].SetText(level.ToString());
                this.m_bLevelUP = (lPreLevel != level);
                if (flag)
                {
                    base.SetShowLayer(2, true);
                }
                else
                {
                    base.SetShowLayer(2, false);
                }
                if (flag)
                {
                    int[] levelChangeValue = this.GetLevelChangeValue(kSolInfo, (short)lPreLevel, (short)level, (int)bPreGrade);
                    this.SetTextShowOrNot(ref this.m_lbLevelUpStat, levelChangeValue);
                }
            }
            if (nAddEvolutionExp > 0L)
            {
                textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1731");

                if (nMaxLvEvolution > 0L)
                {
                    textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2593");

                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[]
                    {
                        textFromInterface,
                        "count",
                        nAddEvolutionExp,
                        "count1",
                        nAddEvolutionExp - nMaxLvEvolution,
                        "count2",
                        nMaxLvEvolution
                    });
                }
                else
                {
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[]
                    {
                        textFromInterface,
                        "count",
                        nAddEvolutionExp
                    });
                }
                if (!kSolInfo.IsMaxGrade())
                {
                    this.m_lbGetGradeExpText.SetText(textFromInterface);
                }
                else
                {
                    this.m_lbGetGradeExpText.SetText(string.Empty);
                }
                base.SetShowLayer(3, true);
                bool flag2 = kSolInfo.GetGrade() != bPreGrade;
                this.dtGradeUpImg.Visible = flag2;
                bool flag3 = false;
                if (COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_TRADECOUNT_USE) == 1 && flag2 && kSolInfo.IsMaxGrade())
                {
                    int num3 = (int)kSolInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_TRADE_COUNT);
                    this.lbGradeUpText.Visible = true;
                    string empty = string.Empty;
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2127"),
                        "count",
                        num3
                    });

                    this.lbGradeUpText.SetText(empty);
                    flag3 = true;
                }
                if (!flag3)
                {
                    this.lbGradeUpText.Visible = false;
                }
                if (flag2)
                {
                    short legendType = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(kSolInfo.GetCharKind(), (int)bPreGrade);

                    UIBaseInfoLoader solLargeGradeImg3 = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(kSolInfo.GetCharKind(), (int)bPreGrade);

                    if (0 < legendType)
                    {
                        this.m_txPreRank.SetSize(solLargeGradeImg3.UVs.width, solLargeGradeImg3.UVs.height);
                    }
                    this.m_txPreRank.SetTexture(solLargeGradeImg3);
                    legendType = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(kSolInfo.GetCharKind(), (int)(bPreGrade + 1));

                    solLargeGradeImg3 = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(kSolInfo.GetCharKind(), (int)(bPreGrade + 1));

                    if (0 < legendType)
                    {
                        this.m_txCurRank.SetSize(solLargeGradeImg3.UVs.width, solLargeGradeImg3.UVs.height);
                    }
                    this.m_txCurRank.SetTexture(solLargeGradeImg3);
                    base.SetShowLayer(4, true);
                    int[] gradeChangeValue = this.GetGradeChangeValue(kSolInfo, kSolInfo.GetLevel(), (int)bPreGrade, (int)kSolInfo.GetGrade());
                    this.SetTextShowOrNot(ref this.m_lbRankUpStat, gradeChangeValue);
                }
                else
                {
                    base.SetShowLayer(4, false);
                }
                this.GradeExpBG.Visible   = true;
                this.GradeExpGage.Visible = true;
                this.GradeExpText.Visible = true;
                long   num4 = kSolInfo.GetEvolutionExp() - kSolInfo.GetCurBaseEvolutionExp();
                long   num5 = kSolInfo.GetNextEvolutionExp() - kSolInfo.GetCurBaseEvolutionExp();
                float  evolutionExpPercent = kSolInfo.GetEvolutionExpPercent();
                string text = string.Empty;
                this.GradeExpGage.SetSize(228f * evolutionExpPercent, this.GradeExpGage.height);
                if (!kSolInfo.IsMaxGrade())
                {
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1871"),
                        "exp",
                        num4.ToString(),
                        "maxexp",
                        num5.ToString()
                    });
                }
                else
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("484");
                }
                this.GradeExpText.SetText(text);
            }
            else
            {
                base.SetShowLayer(3, false);
                base.SetShowLayer(4, false);
            }
        }
    }
    private bool IsValidChangeBattlePos()
    {
        BATTLE_POS_GRID info = BASE_BATTLE_POS_Manager.GetInstance().GetInfo(0);

        if (info == null)
        {
            return(false);
        }
        BATTLE_POS_GRID bATTLE_POS_GRID = new BATTLE_POS_GRID();

        bATTLE_POS_GRID.Set(info, 0, false);
        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo nkSoldierInfo = this.m_kBattlePosSolList[i];
            if (nkSoldierInfo != null && nkSoldierInfo.IsValid())
            {
                if (nkSoldierInfo.GetBattlePos() >= 0)
                {
                    NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(nkSoldierInfo.GetCharKind());

                    if (charKindInfo != null)
                    {
                        if (!BASE_BATTLE_POS_Manager.GetInstance().IsEnablePos(charKindInfo, nkSoldierInfo.GetBattlePos(), bATTLE_POS_GRID))
                        {
                            return(false);
                        }
                        bATTLE_POS_GRID.SetBUID((short)nkSoldierInfo.GetSolPosIndex(), (byte)nkSoldierInfo.GetBattlePos(), charKindInfo.GetBattleSizeX(), charKindInfo.GetBattleSizeY());
                    }
                }
            }
        }
        return(true);
    }
    private void ShowBattlePosInfo()
    {
        for (int i = 0; i < 9; i++)
        {
            this.BattlePosSolSelect[i].Visible = true;
            this.BattlePosSolSelect[i].SetSize(this.fBattlePosSlotSize, this.fBattlePosSlotSize);
            this.BattlePosSolSelect[i].SetTexture("Com_I_Transparent");
            ((UIButton)this.BattlePosSolSelect[i].layers[0]).Visible = true;
            ((UIButton)this.BattlePosSolSelect[i].layers[0]).SetSize(this.fBattlePosSlotSize, this.fBattlePosSlotSize);
            this.BattlePosCoverImage[i].Visible = false;
            this.BattlePosSolImage[i].Visible   = false;
            this.BattlePosSolImage[i].SetLocation(this.BattlePosSolSelect[i].GetLocationX(), this.BattlePosSolSelect[i].GetLocationY());
        }
        for (int j = 0; j < 6; j++)
        {
            NkSoldierInfo nkSoldierInfo = this.m_kBattlePosSolList[j];
            if (nkSoldierInfo != null && nkSoldierInfo.IsValid())
            {
                if (nkSoldierInfo.GetBattlePos() >= 0)
                {
                    NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(nkSoldierInfo.GetCharKind());

                    if (charKindInfo != null)
                    {
                        float num  = (float)charKindInfo.GetBattleSizeX() * this.fBattlePosSlotSize;
                        float num2 = (float)charKindInfo.GetBattleSizeY() * this.fBattlePosSlotSize;
                        if (num > this.fBattlePosSlotSize || num2 > this.fBattlePosSlotSize)
                        {
                            this.BattlePosSolSelect[(int)nkSoldierInfo.GetBattlePos()].SetSize(num, num2);
                            ((UIButton)this.BattlePosSolSelect[(int)nkSoldierInfo.GetBattlePos()].layers[0]).SetSize(num, num2);
                            if (num > this.fBattlePosSlotSize)
                            {
                                for (int k = 1; k < (int)charKindInfo.GetBattleSizeX(); k++)
                                {
                                    this.BattlePosSolSelect[(int)nkSoldierInfo.GetBattlePos() + k].Visible = false;
                                }
                            }
                            if (num2 > this.fBattlePosSlotSize)
                            {
                                for (int l = 1; l < (int)charKindInfo.GetBattleSizeY(); l++)
                                {
                                    this.BattlePosSolSelect[(int)nkSoldierInfo.GetBattlePos() + l * 3].Visible = false;
                                }
                                float y = this.fBattlePosSlotSize / 2f * (float)(charKindInfo.GetBattleSizeY() - 1);
                                this.BattlePosSolImage[(int)nkSoldierInfo.GetBattlePos()].MoveLocation(0f, y);
                            }
                        }
                        this.BattlePosCoverImage[(int)nkSoldierInfo.GetBattlePos()].Visible = true;
                        this.BattlePosSolImage[(int)nkSoldierInfo.GetBattlePos()].Visible   = true;
                        string costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(nkSoldierInfo);

                        this.BattlePosSolImage[(int)nkSoldierInfo.GetBattlePos()].SetTexture(eCharImageType.SMALL, nkSoldierInfo.GetCharKind(), (int)nkSoldierInfo.GetGrade(), costumePortraitPath);
                    }
                }
            }
        }
    }
示例#20
0
    public void ShowSolInfo(bool bStatCalc)
    {
        NkSoldierInfo soldierInfo = this.GetSoldierInfo();

        if (soldierInfo == null)
        {
            return;
        }
        if (soldierInfo.GetCharKindInfo() == null)
        {
            return;
        }
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("290"),
            "targetname",
            soldierInfo.GetName(),
            "count1",
            soldierInfo.GetLevel(),
            "count2",
            soldierInfo.GetSolMaxLevel()
        });

        this.m_lbSolName.SetText(this.m_strText);
        this.m_dtSolImage.SetUVMask(new Rect(4f / this.TEX_SIZE, 0f, 504f / this.TEX_SIZE, 448f / this.TEX_SIZE));
        string costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(soldierInfo);

        this.m_dtSolImage.SetTexture(eCharImageType.LARGE, soldierInfo.GetCharKind(), (int)soldierInfo.GetGrade(), costumePortraitPath);
        UIBaseInfoLoader solLargeGradeImg = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(soldierInfo.GetCharKind(), (int)soldierInfo.GetGrade());

        if (solLargeGradeImg != null)
        {
            this.m_dtSolGrade.Hide(false);
            if (0 < NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(soldierInfo.GetCharKind(), (int)soldierInfo.GetGrade()))
            {
                this.m_dtSolGrade.SetSize(solLargeGradeImg.UVs.width, solLargeGradeImg.UVs.height);
            }
            this.m_dtSolGrade.SetTexture(solLargeGradeImg);
        }
        else
        {
            this.m_dtSolGrade.Hide(true);
        }
        SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);

        sUBDATA_UNION.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_STRDEX);
        SUBDATA_UNION sUBDATA_UNION2 = default(SUBDATA_UNION);

        sUBDATA_UNION2.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_VITINT);
        SUBDATA_UNION sUBDATA_UNION3 = default(SUBDATA_UNION);

        sUBDATA_UNION3.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_INFO);
        short n16SubData_ = sUBDATA_UNION3.n16SubData_0;
        int   statSTR     = soldierInfo.GetStatSTR();
        int   statDEX     = soldierInfo.GetStatDEX();
        int   statVIT     = soldierInfo.GetStatVIT();
        int   statINT     = soldierInfo.GetStatINT();

        this.ShowBaseSolStatAwakening(this.m_lbBaseStat[0], statSTR, sUBDATA_UNION.n32SubData_0);
        this.ShowBaseSolStatAwakening(this.m_lbBaseStat[1], statDEX, sUBDATA_UNION.n32SubData_1);
        this.ShowBaseSolStatAwakening(this.m_lbBaseStat[2], statVIT, sUBDATA_UNION2.n32SubData_0);
        this.ShowBaseSolStatAwakening(this.m_lbBaseStat[3], statINT, sUBDATA_UNION2.n32SubData_1);
        if (this.IsAwakening())
        {
            for (int i = 0; i < 4; i++)
            {
                this.m_lbSolStat_2[i].Hide(false);
            }
            this.ShowBaseSolStat(this.m_lbCurStat[0], statSTR, sUBDATA_UNION.n32SubData_0, this.m_strBaseTextColor);
            this.ShowBaseSolStat(this.m_lbCurStat[1], statDEX, sUBDATA_UNION.n32SubData_1, this.m_strBaseTextColor);
            this.ShowBaseSolStat(this.m_lbCurStat[2], statVIT, sUBDATA_UNION2.n32SubData_0, this.m_strBaseTextColor);
            this.ShowBaseSolStat(this.m_lbCurStat[3], statINT, sUBDATA_UNION2.n32SubData_1, this.m_strBaseTextColor);
        }
        else
        {
            for (int i = 0; i < 4; i++)
            {
                this.m_lbSolStat_2[i].Hide(true);
                this.m_lbCurStat[i].SetText(string.Empty);
            }
        }
        if (bStatCalc)
        {
            for (int i = 0; i < 4; i++)
            {
                this.m_lbSolStat_2[i].Hide(true);
                this.m_lbCurStat[i].Hide(true);
            }
        }
        int needAwakeningItemNum = this.GetNeedAwakeningItemNum((int)(n16SubData_ + 1), soldierInfo.GetSeason());

        this.m_lbNeedAwakeningItemNum.SetText(needAwakeningItemNum.ToString());
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strStat, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2289"),
            "count",
            (int)(n16SubData_ + 1)
        });

        this.m_btStatCalc.SetText(this.m_strStat);
    }
示例#21
0
    public NewListItem UpdateSolList(NkSoldierInfo kSolInfo)
    {
        if (!kSolInfo.IsValid())
        {
            return(null);
        }
        if (this.m_eShowType != SOLCOMPOSE_TYPE.MYTHEVOLUTION)
        {
            if (SolComposeMainDlg.Instance == null)
            {
                return(null);
            }
            if (SolComposeMainDlg.Instance.ContainBaseSoldier(kSolInfo.GetSolID()))
            {
                return(null);
            }
        }
        string      text        = string.Empty;
        NewListItem newListItem = new NewListItem(this.ComposeNewListBox.ColumnNum, true, string.Empty);

        if (newListItem == null)
        {
            return(null);
        }
        EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(kSolInfo.GetCharKind(), kSolInfo.GetGrade());

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

            if (legendFrame != null)
            {
                newListItem.SetListItemData(3, legendFrame, null, null, null);
            }
            else
            {
                newListItem.SetListItemData(3, "Win_T_ItemEmpty", null, null, null);
            }
        }
        newListItem.SetListItemData(4, kSolInfo.GetListSolInfo(false), null, null, null);
        string legendName = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendName(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade(), kSolInfo.GetName());

        newListItem.SetListItemData(5, legendName, null, null, null);
        long  num  = kSolInfo.GetExp() - kSolInfo.GetCurBaseExp();
        long  num2 = kSolInfo.GetNextExp() - kSolInfo.GetCurBaseExp();
        float num3 = 1f;

        if (!kSolInfo.IsMaxLevel())
        {
            num3 = ((float)num2 - (float)kSolInfo.GetRemainExp()) / (float)num2;
            if (num3 > 1f)
            {
                num3 = 1f;
            }
            if (0f > num3)
            {
                num3 = 0f;
            }
        }
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167"),
            "count1",
            kSolInfo.GetLevel().ToString(),
            "count2",
            kSolInfo.GetSolMaxLevel().ToString()
        });

        newListItem.SetListItemData(6, text, null, null, null);
        newListItem.SetListItemData(0, "Win_T_ReputelPrgBG", null, null, null);
        newListItem.SetListItemData(1, "Com_T_GauWaPr4", 270f * num3, null, null);
        if (kSolInfo.IsMaxLevel())
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("286");
        }
        else
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1871"),
                "exp",
                num.ToString(),
                "maxexp",
                num2.ToString()
            });
        }
        newListItem.SetListItemData(2, text, null, null, null);
        newListItem.SetListItemData(7, false);
        if (!this.m_bMainSelect)
        {
            foreach (long current in this.mCheckList)
            {
                if (kSolInfo.GetSolID() == current)
                {
                    newListItem.SetListItemData(7, true);
                    newListItem.SetListItemData(7, "Com_I_Check", null, null, null);
                    break;
                }
            }
        }
        if (!kSolInfo.IsAwakening())
        {
            newListItem.SetListItemData(8, false);
        }
        if (NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLCOMPOSE_MAIN_CHALLENGEQUEST_DLG) == null)
        {
            newListItem.SetListItemData(9, string.Empty, null, new EZValueChangedDelegate(this.ClickSolDetailInfo), null);
        }
        else
        {
            newListItem.SetListItemData(9, false);
        }
        if (kSolInfo.IsAtbCommonFlag(1L))
        {
            newListItem.SetListItemData(10, true);
        }
        else
        {
            newListItem.SetListItemData(10, false);
        }
        newListItem.Data = kSolInfo;
        return(newListItem);
    }
示例#22
0
    public void _SetComponetBasic()
    {
        UIBaseFileManager instance = NrTSingleton <UIBaseFileManager> .Instance;

        instance.CreateCloseButton(ref this.closeButton, UIDataManager.closeButtonName, base.Scale);
        this.m_lbWorldMap_Title       = (base.GetControl("LB_Title") as Label);
        this.m_dtWorldMap_Map         = (base.GetControl("DT_map") as DrawTexture);
        this.m_dtLocalMap_Map         = (base.GetControl("DT_AreaBG") as DrawTexture);
        this.m_dtLocalMap_Day         = (base.GetControl("DT_Day") as DrawTexture);
        this.m_dtLocalMap_Day.Visible = false;
        this.m_dtLocalMap_Night       = (base.GetControl("DT_Night") as DrawTexture);
        this.m_dtLocalMap_Night.SetLocation(this.m_dtLocalMap_Night.GetLocationX(), this.m_dtLocalMap_Night.GetLocationY(), -0.004f);
        this.m_dtLocalMap_Night.Visible     = false;
        this.m_btLocalMap_ReWorld           = (base.GetControl("BT_WorldMap") as Button);
        this.m_btLocalMap_ReWorld.EffectAni = false;
        Button expr_F2 = this.m_btLocalMap_ReWorld;

        expr_F2.Click           = (EZValueChangedDelegate)Delegate.Combine(expr_F2.Click, new EZValueChangedDelegate(this.OnClickLocalMapReWorld));
        this.m_btLocalMap_Night = (base.GetControl("BT_Night") as Button);
        Button expr_12F = this.m_btLocalMap_Night;

        expr_12F.Click        = (EZValueChangedDelegate)Delegate.Combine(expr_12F.Click, new EZValueChangedDelegate(this.OnClickLocalMapNight));
        this.m_btLocalMap_Day = (base.GetControl("BT_Day") as Button);
        Button expr_16C = this.m_btLocalMap_Day;

        expr_16C.Click = (EZValueChangedDelegate)Delegate.Combine(expr_16C.Click, new EZValueChangedDelegate(this.OnClickLocalMapDay));
        this.m_btLocalMap_NpcAutoMove = (base.GetControl("BT_NpcAutoMove") as Button);
        Button expr_1A9 = this.m_btLocalMap_NpcAutoMove;

        expr_1A9.Click = (EZValueChangedDelegate)Delegate.Combine(expr_1A9.Click, new EZValueChangedDelegate(this.OnClickLocalMapNpcAutoMove));
        this.m_btLocalMap_NpcAutoMove.EffectAni = false;
        this.m_btUser_User = (base.GetControl("BT_UserBG") as Button);
        this.m_btUser_User.controlIsEnabled = false;
        this.m_dtUser_Icon = (base.GetControl("DT_UserImg") as DrawTexture);
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        Texture2D texture2D = null;

        if (myCharInfo != null)
        {
            int num      = myCharInfo.GetFaceCharKind();
            int solgrade = (int)myCharInfo.GetFaceSolGrade();
            if (num == 0)
            {
                NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

                if (nrCharUser != null)
                {
                    NkSoldierInfo soldierInfo = nrCharUser.GetPersonInfoUser().GetSoldierInfo(0);
                    if (soldierInfo != null && soldierInfo.IsValid())
                    {
                        num      = soldierInfo.GetCharKind();
                        solgrade = (int)soldierInfo.GetGrade();
                    }
                }
            }
            if (myCharInfo.UserPortrait)
            {
                texture2D = myCharInfo.UserPortraitTexture;
            }
            if (texture2D != null)
            {
                this.m_dtUser_Icon.SetTexture(texture2D);
            }
            else
            {
                string costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(myCharInfo.GetFaceCostumeUnique());

                this.m_dtUser_Icon.SetTexture(eCharImageType.SMALL, num, solgrade, costumePortraitPath);
            }
        }
        this.m_btUser_User.Visible = false;
        this.m_dtUser_Icon.Visible = false;
        this.m_WorldMapInfo        = NrTSingleton <NrBaseTableManager> .Instance.GetWorldMapInfo("1");

        if (this.m_WorldMapInfo == null)
        {
            return;
        }
        this.m_MaxLocalMapCount = NrTSingleton <NrBaseTableManager> .Instance.GetLocalMapCount();

        this.m_btWorldMap_AreaIcon = new UIButton[this.m_MaxLocalMapCount];
        this.m_lbWorldMap_AreaName = new Label[this.m_MaxLocalMapCount];
        this.m_pkCharMapInfo       = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_kCharMapInfo;
        this.m_selectLocalMap      = NrTSingleton <NrBaseTableManager> .Instance.GetLocalMapInfoFromMapIndex(this.m_pkCharMapInfo.m_nMapIndex);

        if (this.m_selectLocalMap == null)
        {
            this.Close();
            return;
        }
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(this.m_selectLocalMap.LOCALMAP_NAME_TEXT_INDEX);

        this.m_lbWorldMap_Title.SetText(textFromInterface);
        this.m_dtLocalMap_Map.SetTextureFromBundle(this.m_selectLocalMap.GetBundlePath());
        MAP_INFO mapInfo = NrTSingleton <NrBaseTableManager> .Instance.GetMapInfo(this.m_pkCharMapInfo.m_nMapIndex.ToString());

        if (mapInfo != null && mapInfo.MAP_NIGHTMODE == 1)
        {
            this.m_bNowNightMode = true;
        }
        string name  = string.Empty;
        string name2 = string.Empty;

        this.m_btLocalMap_AreaIcon = new UIButton[20];
        this.m_lbLocalMap_AreaName = new Label[20];
        for (int i = 0; i < 20; i++)
        {
            name  = "BT_LocalMapAreaIcon" + i.ToString();
            name2 = "LB_LocalMapAreaName" + i.ToString();
            this.m_btLocalMap_AreaIcon[i] = UICreateControl.Button(name, "Main_B_Map", 64f, 64f);
            this.m_lbLocalMap_AreaName[i] = UICreateControl.Label(name2, null, false, 280f, 28f, SpriteText.Font_Effect.Black_Shadow_Small, SpriteText.Anchor_Pos.Middle_Center, SpriteText.Alignment_Type.Left, Color.white);
            if (null != this.m_btLocalMap_AreaIcon[i])
            {
                this.m_btLocalMap_AreaIcon[i].Data = 0;
                this.m_btLocalMap_AreaIcon[i].SetSize(64f, 64f);
                this.m_btLocalMap_AreaIcon[i].Start();
                this.m_btLocalMap_AreaIcon[i].UseDefaultSound = false;
                this.m_lbLocalMap_AreaName[i].Visible         = false;
                base.InteractivePanel.MakeChild(this.m_btLocalMap_AreaIcon[i].gameObject);
                base.InteractivePanel.MakeChild(this.m_lbLocalMap_AreaName[i].gameObject);
            }
        }
        for (int j = 0; j < 20; j++)
        {
            this.m_pTreasure[j] = new TreasureData();
            this.m_pTreasure[j].Init(j);
            this.m_pTreasure[j].TreasureShow(false);
            if (this.m_pTreasure[j].GetTexture())
            {
                base.InteractivePanel.MakeChild(this.m_pTreasure[j].GetTexture().gameObject);
            }
            if (this.m_pTreasure[j].GetDrawTexture())
            {
                base.InteractivePanel.MakeChild(this.m_pTreasure[j].GetDrawTexture().gameObject);
            }
        }
        this.SetLocalMapTitle();
        this.SetLocalMapMapIcon();
        for (int k = 0; k < this.m_MaxLocalMapCount; k++)
        {
            int           num2         = k + 1;
            LOCALMAP_INFO localMapInfo = NrTSingleton <NrBaseTableManager> .Instance.GetLocalMapInfo(num2.ToString());

            if (localMapInfo != null)
            {
                if (localMapInfo.LOCALMAP_IDX == num2)
                {
                    if (localMapInfo != null)
                    {
                        name  = "BT_WorldMapAreaIcon" + k.ToString();
                        name2 = "LB_WorldMapAreaName" + k.ToString();
                        this.m_btWorldMap_AreaIcon[k]           = UICreateControl.Button(name, localMapInfo.LOCALMAP_ICON, 64f, 64f);
                        this.m_btWorldMap_AreaIcon[k].EffectAni = false;
                        string textFromInterface2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(localMapInfo.LOCALMAP_NAME_TEXT_INDEX);

                        this.m_lbWorldMap_AreaName[k] = UICreateControl.Label(name2, NrTSingleton <CTextParser> .Instance.GetTextColor("1002") + textFromInterface2, false, 280f, 28f, SpriteText.Font_Effect.Black_Shadow_Small, SpriteText.Anchor_Pos.Middle_Center, SpriteText.Alignment_Type.Left, Color.white);
                        if (null != this.m_btWorldMap_AreaIcon[k])
                        {
                            this.m_btWorldMap_AreaIcon[k].AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickWorldMapToLocalArea));
                            this.m_btWorldMap_AreaIcon[k].SetLocation(localMapInfo.LOCALMAP_X + 20f, localMapInfo.LOCALMAP_Y + 64f);
                            this.m_btWorldMap_AreaIcon[k].Data = localMapInfo.LOCALMAP_IDX;
                            this.m_lbWorldMap_AreaName[k].SetLocation(localMapInfo.LOCALMAP_X + 20f + -107f, localMapInfo.LOCALMAP_Y + 64f + 84f);
                            base.InteractivePanel.MakeChild(this.m_btWorldMap_AreaIcon[k].gameObject);
                            base.InteractivePanel.MakeChild(this.m_lbWorldMap_AreaName[k].gameObject);
                        }
                        this.m_btWorldMap_AreaIcon[k].Start();
                        if (!NrTSingleton <ContentsLimitManager> .Instance.IsWorldMapMove(num2))
                        {
                            this.m_btWorldMap_AreaIcon[k].Hide(true);
                            this.m_lbWorldMap_AreaName[k].Hide(true);
                        }
                    }
                }
            }
        }
        base.SetScreenCenter();
        this.ShowLocalMap(true);
        this.SetUserIcon();
    }
示例#23
0
    public void ShowInfo()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        NkSoldierInfo leaderSoldierInfo = charPersonInfo.GetLeaderSoldierInfo();

        if (leaderSoldierInfo == null)
        {
            return;
        }
        int num = (int)NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_REINCARNATION_COUNT);

        int num2 = num + 1;
        ReincarnationInfo reincarnation = NrTSingleton <NrBaseTableManager> .Instance.GetReincarnation(num.ToString());

        if (reincarnation == null)
        {
            return;
        }
        ReincarnationInfo reincarnation2 = NrTSingleton <NrBaseTableManager> .Instance.GetReincarnation(num2.ToString());

        if (reincarnation2 == null)
        {
            return;
        }
        UIBaseInfoLoader solGradeImg = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolGradeImg(leaderSoldierInfo.GetCharKind(), (int)leaderSoldierInfo.GetGrade());

        if (solGradeImg != null)
        {
            this.m_dtCurRank.Visible = true;
            this.m_dtCurRank.SetTexture(solGradeImg);
        }
        else
        {
            this.m_dtCurRank.Visible = false;
        }
        this.m_dtCurPortrait.SetTexture(eCharImageType.LARGE, leaderSoldierInfo.GetCharKind(), (int)leaderSoldierInfo.GetGrade(), string.Empty);
        int num3 = leaderSoldierInfo.GetSeason() + 1;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1208"),
            "count",
            num3.ToString()
        });

        this.m_lbCurSeason.SetText(this.m_strText);
        solGradeImg = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolGradeImg(leaderSoldierInfo.GetCharKind(), 0);

        if (solGradeImg != null)
        {
            this.m_dtAfterRank.Visible = true;
            this.m_dtAfterRank.SetTexture(solGradeImg);
        }
        else
        {
            this.m_dtAfterRank.Visible = false;
        }
        int reincarnationCharKind = reincarnation2.GetReincarnationCharKind(reincarnation, leaderSoldierInfo.GetCharKind());

        this.m_dtAfterPortrait.SetTexture(eCharImageType.LARGE, reincarnationCharKind, 0, string.Empty);
        num3 = 2;
        NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(reincarnationCharKind);

        if (charKindInfo != null)
        {
            BASE_SOLGRADEINFO cHARKIND_SOLGRADEINFO = charKindInfo.GetCHARKIND_SOLGRADEINFO(0);
            if (cHARKIND_SOLGRADEINFO != null)
            {
                num3 = cHARKIND_SOLGRADEINFO.SolSeason + 1;
            }
        }
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1208"),
            "count",
            num3.ToString()
        });

        this.m_lbAfterSeason.SetText(this.m_strText);
        this.m_lNeedMoney = reincarnation2.lNeedMoney;
        this.m_lbNeedMoney.SetText(ANNUALIZED.Convert(reincarnation2.lNeedMoney));
        this.m_lbMyMoney.SetText(ANNUALIZED.Convert(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money));
    }
示例#24
0
    public void SetList()
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        this.m_lbCurrentStatus.Clear();
        string text  = string.Empty;
        string empty = string.Empty;
        int    num   = 0;

        foreach (EXPEDITION_CURRENT_STATE_INFO current in this.m_listExpedition_CurrentStatus)
        {
            NewListItem newListItem = new NewListItem(this.m_lbCurrentStatus.ColumnNum, true, string.Empty);
            if ((current.ui8ExpeditionState == 1 || current.ui8ExpeditionState == 3) && current.i64Time == current.i64CheckBattleTime)
            {
                newListItem.SetListItemData(0, true);
                newListItem.SetListItemData(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1615"), current, new EZValueChangedDelegate(this.OnClickBackMove), null);
            }
            else
            {
                newListItem.SetListItemData(0, false);
            }
            newListItem.SetListItemData(1, this.GetExpeditionState(current), null, null, null);
            if (current.ui8ExpeditionState == 1 || current.ui8ExpeditionState == 2 || current.ui8ExpeditionState == 4)
            {
                NkExpeditionMilitaryInfo validExpeditionMilitaryInfo = kMyCharInfo.GetMilitaryList().GetValidExpeditionMilitaryInfo(current.ui8ExpeditionMilitaryUniq);
                if (validExpeditionMilitaryInfo != null)
                {
                    NkSoldierInfo leaderSolInfo = validExpeditionMilitaryInfo.GetLeaderSolInfo();
                    if (leaderSolInfo != null)
                    {
                        EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(leaderSolInfo.GetCharKind(), leaderSolInfo.GetGrade());

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

                            if (legendFrame != null)
                            {
                                newListItem.SetListItemData(5, legendFrame, null, null, null);
                            }
                            else
                            {
                                newListItem.SetListItemData(5, "Win_I_Cancel", null, null, null);
                            }
                        }
                        newListItem.SetListItemData(7, leaderSolInfo.GetListSolInfo(false), null, null, null);
                        newListItem.SetListItemData(3, string.Empty, current, new EZValueChangedDelegate(this.OnClickDetailInfo), null);
                    }
                    newListItem.SetListItemData(9, leaderSolInfo.GetCharKindInfo().GetName(), null, null, null);
                }
                EXPEDITION_CREATE_DATA expedtionCreateData = BASE_EXPEDITION_CREATE_DATA.GetExpedtionCreateData(current.i16ExpeditionCreateDataID);
                if (expedtionCreateData != null)
                {
                    EXPEDITION_DATA expeditionDataFromGrade = BASE_EXPEDITION_DATA.GetExpeditionDataFromGrade(expedtionCreateData.EXPEDITION_GRADE);
                    if (expeditionDataFromGrade != null)
                    {
                        newListItem.SetListItemData(8, false);
                        UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(expeditionDataFromGrade.Expedition_ICON_NAME);

                        if (uIBaseInfoLoader != null)
                        {
                            newListItem.SetListItemData(4, uIBaseInfoLoader, current, new EZValueChangedDelegate(this.OnClickMonDetailInfo), null);
                        }
                        newListItem.SetListItemData(10, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(expeditionDataFromGrade.Expedition_GRADE_INTERFACEKEY), null, null, null);
                    }
                }
            }
            else if (current.ui8ExpeditionState == 3)
            {
                EXPEDITION_CREATE_DATA expedtionCreateData2 = BASE_EXPEDITION_CREATE_DATA.GetExpedtionCreateData(current.i16ExpeditionCreateDataID);
                if (expedtionCreateData2 != null)
                {
                    int num2 = expedtionCreateData2.EXPEDITION_ECO[0];
                    ECO eco  = NrTSingleton <NrBaseTableManager> .Instance.GetEco(num2.ToString());

                    if (eco != null)
                    {
                        newListItem.SetListItemData(7, NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco.szCharCode[0]), null, null, null);
                        newListItem.SetListItemData(3, NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco.szCharCode[0]), current, new EZValueChangedDelegate(this.OnClickMonDetailInfo), null);
                        newListItem.SetListItemData(9, NrTSingleton <NrCharKindInfoManager> .Instance.GetName(NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco.szCharCode[0])), null, null, null);
                    }
                }
                NkExpeditionMilitaryInfo validExpeditionMilitaryInfo2 = kMyCharInfo.GetMilitaryList().GetValidExpeditionMilitaryInfo(current.ui8ExpeditionMilitaryUniq);
                if (validExpeditionMilitaryInfo2 != null)
                {
                    NkSoldierInfo leaderSolInfo2 = validExpeditionMilitaryInfo2.GetLeaderSolInfo();
                    if (leaderSolInfo2 != null)
                    {
                        UIBaseInfoLoader legendFrame2 = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(leaderSolInfo2.GetCharKind(), (int)leaderSolInfo2.GetGrade());

                        if (legendFrame2 != null)
                        {
                            newListItem.SetListItemData(6, legendFrame2, null, null, null);
                        }
                        else
                        {
                            newListItem.SetListItemData(6, "Win_I_Cancel", null, null, null);
                        }
                        newListItem.SetListItemData(8, leaderSolInfo2.GetListSolInfo(false), null, null, null);
                    }
                    newListItem.SetListItemData(4, string.Empty, current, new EZValueChangedDelegate(this.OnClickDetailInfo), null);
                    newListItem.SetListItemData(10, leaderSolInfo2.GetCharKindInfo().GetName(), null, null, null);
                }
            }
            newListItem.Data = current;
            this.m_lbCurrentStatus.Add(newListItem);
            num++;
        }
        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1633");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            text,
            "count1",
            this.m_Page,
            "count2",
            this.m_MaxPage
        });

        this.m_bxPage.SetText(empty);
        this.m_lbCurrentStatus.RepositionItems();
    }
示例#25
0
    public void SetData(byte bPreGrade, long lPreLevel, long lGetExp, NkSoldierInfo kSolInfo)
    {
        string text     = string.Empty;
        string text2    = string.Empty;
        string text3    = string.Empty;
        int    charkind = 0;
        int    solgrade = 0;

        if (kSolInfo != null)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1731");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                text,
                "count",
                lGetExp
            });

            if (lPreLevel != (long)kSolInfo.GetLevel())
            {
                text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1732");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
                {
                    text2,
                    "count1",
                    lPreLevel,
                    "count2",
                    kSolInfo.GetLevel()
                });
            }
            BASE_SOLGRADEINFO    cHARKIND_SOLGRADEINFO  = kSolInfo.GetCharKindInfo().GetCHARKIND_SOLGRADEINFO((int)bPreGrade);
            CHARKIND_SOLSTATINFO kSolStatInfo           = cHARKIND_SOLGRADEINFO.kSolStatInfo;
            BASE_SOLGRADEINFO    cHARKIND_SOLGRADEINFO2 = kSolInfo.GetCharKindInfo().GetCHARKIND_SOLGRADEINFO((int)kSolInfo.GetGrade());
            CHARKIND_SOLSTATINFO kSolStatInfo2          = cHARKIND_SOLGRADEINFO2.kSolStatInfo;
            text3    = kSolInfo.GetName();
            charkind = kSolInfo.GetCharKind();
            solgrade = (int)kSolInfo.GetGrade();
            NrSound.ImmedatePlay("UI_SFX", "QUEST", "SOLDIERRECRUIT");
            short[] propertys = this.GetPropertys(kSolStatInfo, kSolStatInfo2);
            if (propertys.Length != this.arPerpertyKeys.Length)
            {
                Debug.LogError(string.Format("Property size V:{0} != S:{1}", propertys.Length, this.arPerpertyKeys.Length));
                return;
            }
            for (int i = 0; i < 4; i++)
            {
                this.lbPropertyText[i].Visible  = false;
                this.lbPropertyValue[i].Visible = false;
            }
            int num = 0;
            for (int j = 0; j < propertys.Length; j++)
            {
                string strTextKey = this.arPerpertyKeys[j];
                short  num2       = propertys[j];
                if (0 < num2)
                {
                    this.lbPropertyText[num].Visible = true;
                    this.lbPropertyText[num].SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(strTextKey));
                    this.lbPropertyValue[num].Visible = true;
                    this.lbPropertyValue[num].SetText(num2.ToString());
                    num++;
                    if (num > 4)
                    {
                        Debug.LogError(string.Format("VALID_PROPERTY_MAX {0}", j));
                        break;
                    }
                }
            }
        }
        this.itSoldier.SetSolImageTexure(eCharImageType.LARGE, charkind, solgrade);
        this.lbAddExp.SetText(text);
        this.lbAddLevel.SetText(text2);
        this.lbName.SetText(text3);
    }
    public void SetDeadSol(long nSolID)
    {
        if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_COLOSSEUM)
        {
            return;
        }
        if ((Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_BABELTOWER || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_BOUNTYHUNT) && Battle.BabelPartyCount != 1)
        {
            return;
        }
        if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_MYTHRAID || Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_NEWEXPLORATION)
        {
            return;
        }
        BATTLE_CONSTANT_Manager instance = BATTLE_CONSTANT_Manager.GetInstance();

        if (instance == null)
        {
            return;
        }
        int num = (int)instance.GetValue(eBATTLE_CONSTANT.eBATTLE_CONSTANT_RESURRECTION_COUNT);

        if (this.nReviveCount >= num)
        {
            if (this.m_nlDeadSolList.Count > 0)
            {
                this.m_nlDeadSolList.Clear();
            }
            return;
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(nSolID);

        if (soldierInfoFromSolID == null || !soldierInfoFromSolID.IsValid())
        {
            return;
        }
        if (this.m_nlDeadSolList.Count >= 3)
        {
            this.m_nlDeadSolList.RemoveItem(0, true);
        }
        NewListItem newListItem = new NewListItem(this.m_nlDeadSolList.ColumnNum, true, string.Empty);

        newListItem.Data = soldierInfoFromSolID.GetSolID();
        NkListSolInfo nkListSolInfo = new NkListSolInfo();

        nkListSolInfo.SolCharKind            = soldierInfoFromSolID.GetCharKind();
        nkListSolInfo.SolGrade               = (int)soldierInfoFromSolID.GetGrade();
        nkListSolInfo.SolLevel               = soldierInfoFromSolID.GetLevel();
        nkListSolInfo.FightPower             = soldierInfoFromSolID.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_FIGHTINGPOWER);
        nkListSolInfo.ShowLevel              = false;
        nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(soldierInfoFromSolID);

        NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(soldierInfoFromSolID.GetCharKind());

        if (charKindInfo != null)
        {
            short gradeMaxLevel = charKindInfo.GetGradeMaxLevel((short)soldierInfoFromSolID.GetGrade());
            if (soldierInfoFromSolID.GetLevel() >= gradeMaxLevel)
            {
                nkListSolInfo.ShowCombat = true;
                nkListSolInfo.ShowLevel  = false;
            }
            else
            {
                nkListSolInfo.ShowCombat = false;
                nkListSolInfo.ShowLevel  = true;
            }
        }
        newListItem.SetListItemData(1, nkListSolInfo, soldierInfoFromSolID, new EZValueChangedDelegate(this.BtClickUpListBox), null);
        this.m_nlDeadSolList.Add(newListItem);
        this.m_nlDeadSolList.RepositionItems();
        base.AllHideLayer();
        base.ShowLayer(this.DEAD_SOLLIST_LAYER_2);
    }
    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();
    }
    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();
    }
示例#29
0
    private void SetSolInitiativeColum(NkSoldierInfo LastSolInfo, NkSoldierInfo NowSolInfo, int index, ref NewListItem item, ref int ShowIndex)
    {
        string empty = string.Empty;

        if (LastSolInfo != null && LastSolInfo.GetInitiativeValue() != NowSolInfo.GetInitiativeValue())
        {
            ShowIndex = index + 1;
        }
        EVENT_HERODATA eventHeroCheck = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCheck(NowSolInfo.GetCharKind(), NowSolInfo.GetGrade());

        if (eventHeroCheck != null)
        {
            item.SetListItemData(1, "Win_I_EventSol", null, null, null);
        }
        else
        {
            UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(NowSolInfo.GetCharKind(), (int)NowSolInfo.GetGrade());

            if (legendFrame != null)
            {
                item.SetListItemData(1, legendFrame, null, null, null);
            }
            else
            {
                item.SetListItemData(1, "Win_I_Cancel", null, null, null);
            }
        }
        item.SetListItemData(5, ShowIndex.ToString(), NowSolInfo.GetInitiativeValue(), null, null);
        item.SetListItemData(4, NowSolInfo.GetListSolInfo(true), NowSolInfo, null, null);
        item.SetListItemData(2, NowSolInfo.GetName(), null, null, null);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167"),
            "count1",
            NowSolInfo.GetLevel().ToString(),
            "count2",
            NowSolInfo.GetSolMaxLevel().ToString()
        });

        item.SetListItemData(3, empty, null, null, null);
        item.SetListItemData(8, string.Empty, NowSolInfo.GetSolID(), new EZValueChangedDelegate(this.OnClickInitiativeDown), null);
        item.SetListItemData(9, string.Empty, NowSolInfo.GetSolID(), new EZValueChangedDelegate(this.OnClickInitiativeUP), null);
        item.SetListItemData(11, NowSolInfo.GetInitiativeValue().ToString(), null, null, null);
        float num = 0f;

        if (NowSolInfo.GetInitiativeValue() >= 0)
        {
            num = (float)NowSolInfo.GetInitiativeValue() / 100f;
            this.m_oldHSInittiativeValue.Add(num);
        }
        item.SetFloatListItemData(12, num, index, new EZValueChangedDelegate(this.OnMoveSlider), null);
        int charKind = 0;

        if (NowSolInfo.IsAtbCommonFlag(8L))
        {
            charKind = 1;
        }
        item.SetListItemData(13, charKind, index, new EZValueChangedDelegate(this.ClickOnlySkillCheckBox), null);
    }
示例#30
0
    protected void SetSolListInfo(NkSoldierInfo pkSolinfo)
    {
        long  num  = pkSolinfo.GetExp() - pkSolinfo.GetCurBaseExp();
        long  num2 = pkSolinfo.GetNextExp() - pkSolinfo.GetCurBaseExp();
        float num3 = ((float)num2 - (float)pkSolinfo.GetRemainExp()) / (float)num2;

        if (num3 > 1f)
        {
            num3 = 1f;
        }
        if (0f > num3)
        {
            num3 = 0f;
        }
        if (pkSolinfo.IsMaxLevel())
        {
            num3 = 1f;
        }
        string         text              = string.Empty;
        NewListItem    newListItem       = new NewListItem(this.SoldierList.ColumnNum, true, string.Empty);
        EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(pkSolinfo.GetCharKind(), pkSolinfo.GetGrade());

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

            if (legendFrame != null)
            {
                newListItem.SetListItemData(0, legendFrame, null, null, null);
            }
        }
        newListItem.SetListItemData(1, pkSolinfo.GetListSolInfo(false), null, null, null);
        string legendName = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendName(pkSolinfo.GetCharKind(), (int)pkSolinfo.GetGrade(), pkSolinfo.GetName());

        newListItem.SetListItemData(2, legendName, null, null, null);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167"),
            "count1",
            pkSolinfo.GetLevel().ToString(),
            "count2",
            pkSolinfo.GetSolMaxLevel().ToString()
        });

        newListItem.SetListItemData(3, text, null, null, null);
        int num4 = pkSolinfo.GetEquipWeaponOrigin();

        if (num4 > 0)
        {
            newListItem.SetListItemData(4, "Win_I_Weapon" + num4.ToString(), null, null, null);
        }
        num4 = pkSolinfo.GetEquipWeaponExtention();
        if (num4 > 0)
        {
            newListItem.SetListItemData(4, "Win_I_Weapon" + num4.ToString(), null, null, null);
        }
        if (pkSolinfo.IsAwakening())
        {
            newListItem.SetListItemData(5, "Win_I_DarkAlchemy", null, null, null);
        }
        else
        {
            newListItem.SetListItemData(5, false);
        }
        newListItem.SetListItemData(7, NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary("Com_T_GauWaPr4"), 250f * num3, null, null);
        if (pkSolinfo.IsMaxLevel())
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("286");
        }
        else
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1871"),
                "exp",
                num.ToString(),
                "maxexp",
                num2.ToString()
            });
        }
        newListItem.SetListItemData(8, text, null, null, null);
        newListItem.Data = pkSolinfo;
        this.SoldierList.Add(newListItem);
    }