private void InsertMythList(SolComposeListDlg.SOL_LIST_INSERT_TYPE eIndex)
    {
        this.mSortList.Clear();
        this.mCheckList.Clear();
        bool flag  = eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.ALL || eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.BATTLE;
        bool flag2 = eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.ALL || eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.WAIT;

        if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo != null)
        {
            NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

            if (flag && charPersonInfo != null)
            {
                for (int i = 0; i < 6; i++)
                {
                    NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i);
                    if (soldierInfo != null)
                    {
                        if (soldierInfo.GetSolID() > 0L)
                        {
                            if (soldierInfo.GetGrade() >= 6 && soldierInfo.GetGrade() < 10)
                            {
                                this.mSortList.Add(soldierInfo);
                            }
                        }
                    }
                }
            }
            if (flag2)
            {
                NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

                foreach (NkSoldierInfo current in readySolList.GetList().Values)
                {
                    if (current.GetSolID() != NrTSingleton <NkCharManager> .Instance.GetMyCharInfo().GetFaceSolID())
                    {
                        if (current.GetSolPosType() == 0 && current.GetGrade() >= 6 && current.GetGrade() < 10)
                        {
                            this.mSortList.Add(current);
                        }
                    }
                }
            }
        }
        this.ddList1.SetIndex((int)eIndex);
        this.ddList1.RepositionItems();
        this.ChangeSortDDL(null);
    }
Exemple #2
0
    private int[] GetStat(NkSoldierInfo pSoldierinfo, short nLevel, int nGrade = -1)
    {
        NrCharKindInfo charKindInfo = pSoldierinfo.GetCharKindInfo();

        int[] array    = new int[4];
        int   solgrade = (nGrade != -1) ? nGrade : ((int)pSoldierinfo.GetGrade());

        array[0]  = charKindInfo.GetGradePlusSTR(solgrade);
        array[1]  = charKindInfo.GetGradePlusVIT(solgrade);
        array[2]  = charKindInfo.GetGradePlusDEX(solgrade);
        array[3]  = charKindInfo.GetGradePlusINT(solgrade);
        array[0] += charKindInfo.GetIncSTR(solgrade, (int)nLevel);
        array[1] += charKindInfo.GetIncVIT(solgrade, (int)nLevel);
        array[2] += charKindInfo.GetIncDEX(solgrade, (int)nLevel);
        array[3] += charKindInfo.GetIncINT(solgrade, (int)nLevel);
        TsLog.Log("Grade : {4} Level : {5} ,STR : {0} VIT : {1} DEX: {2} INT:{3}", new object[]
        {
            array[0],
            array[1],
            array[2],
            array[3],
            nGrade,
            nLevel
        });
        return(array);
    }
 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)
     });
 }
Exemple #4
0
    private int[] GetLevelChangeValue(NkSoldierInfo pSoldierinfo, short PreLevel, short nLevel, int nGrade = -1)
    {
        int nGrade2 = (nGrade != -1) ? nGrade : ((int)pSoldierinfo.GetGrade());

        int[] array  = new int[4];
        int[] array2 = new int[4];
        array  = this.GetStat(pSoldierinfo, PreLevel, nGrade2);
        array2 = this.GetStat(pSoldierinfo, nLevel, nGrade2);
        return(new int[]
        {
            array2[0] - array[0],
            array2[1] - array[1],
            array2[2] - array[2],
            array2[3] - array[3]
        });
    }
Exemple #5
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();
 }
        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 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);
    }
    private void _LinkSolData()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

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

        this.m_lbSolList.Clear();
        foreach (GS_BATTLE_RESULT_SOLDIER current in this.m_SolInfoList)
        {
            NewListItem    newListItem  = new NewListItem(this.m_lbSolList.ColumnNum, true, string.Empty);
            NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(current.CharKind);

            if (charKindInfo != null)
            {
                newListItem.SetListItemData(1, new NkListSolInfo
                {
                    SolCharKind            = current.CharKind,
                    SolGrade               = current.SolGrade,
                    SolInjuryStatus        = current.bInjury,
                    SolLevel               = current.i16Level,
                    ShowLevel              = true,
                    SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(current.i32CostumeUnique)
                }, null, null, null);
                string text = string.Empty;
                text = charKindInfo.GetName();
                string text2 = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("471"),
                    "targetname",
                    text,
                    "count",
                    current.i16Level
                });

                newListItem.SetListItemData(2, text2, null, null, null);
                NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(current.SolID);
                short         num2 = 0;
                if (soldierInfoFromSolID != null)
                {
                    num2 = charKindInfo.GetGradeMaxLevel((short)soldierInfoFromSolID.GetGrade());
                    float  num3  = soldierInfoFromSolID.GetExpPercent();
                    string empty = string.Empty;
                    if (num3 < 0f)
                    {
                        num3 = 0f;
                    }
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("672"),
                        "Count",
                        ((int)(num3 * 100f)).ToString()
                    });

                    newListItem.SetListItemData(4, "Com_T_GauWaPr4", 400f * num3, null, null);
                    newListItem.SetListItemData(5, empty, null, null, null);
                }
                if (num2 == current.i16Level)
                {
                    newListItem.SetListItemData(6, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("286"), null, null, null);
                }
                else
                {
                    string empty2 = string.Empty;
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1802"),
                        "exp",
                        ANNUALIZED.Convert(current.i32AddExp)
                    });

                    text2 += "\r\n";
                    text2 += empty2;
                    newListItem.SetListItemData(6, empty2, null, null, null);
                }
                this.m_lbSolList.Add(newListItem);
                num++;
            }
        }
        this.m_lbSolList.RepositionItems();
    }
    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);
                    }
                }
            }
        }
    }
    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);
    }
    protected virtual void BtnClickListBox(IUIObject obj)
    {
        UIListItemContainer selectedItem = this.ComposeNewListBox.SelectedItem;

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

        if (nkSoldierInfo == null)
        {
            return;
        }
        if (this.IsContainSelect(nkSoldierInfo.GetSolID()))
        {
            this.mCheckList.Remove(nkSoldierInfo.GetSolID());
        }
        else
        {
            if (!this.m_bMainSelect && nkSoldierInfo.IsAtbCommonFlag(1L))
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("724"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
                return;
            }
            if (this.m_eShowType == SOLCOMPOSE_TYPE.EXTRACT)
            {
                if (nkSoldierInfo.GetGrade() < 5 || nkSoldierInfo.GetGrade() >= 6)
                {
                    return;
                }
                if (this.mCheckList.Count >= 10)
                {
                    return;
                }
            }
            else if (this.m_eShowType == SOLCOMPOSE_TYPE.TRANSCENDENCE)
            {
                foreach (long current in this.mCheckList)
                {
                    NkSoldierInfo soldierInfo = SolComposeMainDlg.GetSoldierInfo(current);
                    if (soldierInfo != null)
                    {
                        this.UpdateSolListCheck(soldierInfo, false);
                    }
                }
                this.mCheckList.Clear();
            }
            else if (this.m_eShowType == SOLCOMPOSE_TYPE.MYTHEVOLUTION)
            {
                if (nkSoldierInfo.GetGrade() < 5 || nkSoldierInfo.GetGrade() >= 10)
                {
                    return;
                }
            }
            else if (this.mCheckList.Count >= 50)
            {
                return;
            }
            this.mCheckList.Add(nkSoldierInfo.GetSolID());
        }
        if (this.m_bMainSelect)
        {
            this.SelectFinish();
            return;
        }
        if (this.IsContainSelect(nkSoldierInfo.GetSolID()))
        {
            this.UpdateSolListCheck(nkSoldierInfo, true);
        }
        else
        {
            this.UpdateSolListCheck(nkSoldierInfo, false);
        }
        switch (this.m_eShowType)
        {
        case SOLCOMPOSE_TYPE.COMPOSE:
            this.UpdateComposeData();
            break;

        case SOLCOMPOSE_TYPE.SELL:
            this.UpdateSellData();
            break;

        case SOLCOMPOSE_TYPE.EXTRACT:
            this.UpdateExtractData();
            break;

        case SOLCOMPOSE_TYPE.MYTHEVOLUTION:
            this.UpdateMythEvolution();
            break;
        }
    }
    public void SetData(NkSoldierInfo composeBaseSol, NkSoldierInfo composeMaterialSol, SOLCOMPOSE_TYPE _Type = SOLCOMPOSE_TYPE.COMPOSE)
    {
        if (composeMaterialSol == null)
        {
            this.Close();
            return;
        }
        this._dummyComposeBaseSol     = composeBaseSol;
        this._dummyComposeMaterialSol = composeMaterialSol;
        this.lbName.SetText(composeMaterialSol.GetName());
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1031");

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

        this.lbLevel.SetText(textFromInterface);
        this.dtSoldier.SetTexture(eCharImageType.SMALL, composeMaterialSol.GetCharKind(), (int)composeMaterialSol.GetGrade(), string.Empty);
        this.lbSubNum.Visible = false;
        this.lbGold.SetText(string.Format("{0:###,###,###,##0}", SolComposeMainDlg.Instance.COST));
        this.lbTitle.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2033"));
        this.lbExplain.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1717"));
        this.lbMoneyName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1728"));
        this.btnOk.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1729"));
    }
    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);
    }
Exemple #14
0
 private void GetSolGradeCheck(ref NkSoldierInfo pkSolinfo, ref eElement_MsgType eElement_Msg, NkSoldierInfo pkReadySolinfo, byte bCharGrade)
 {
     if (NrTSingleton <ContentsLimitManager> .Instance.IsSolGuideCharKindInfo(pkReadySolinfo.GetCharKind()))
     {
         eElement_Msg = eElement_MsgType.eElement_NOTSOL;
         TsLog.LogOnlyEditor("!!!! CONTENTLIMIT SOL CHARKIND ERROR {0}" + this.m_SelectSlotData.i32KindInfo + " !!");
         return;
     }
     if (pkReadySolinfo == null)
     {
         return;
     }
     if (pkReadySolinfo.IsCostumeEquip())
     {
         return;
     }
     if (pkReadySolinfo.GetMaxSkillLevel())
     {
         if (pkReadySolinfo.GetGrade() >= bCharGrade)
         {
             if (pkReadySolinfo.GetGrade() == bCharGrade)
             {
                 if (eElement_Msg == eElement_MsgType.eElement_OK)
                 {
                     if (pkSolinfo.GetEvolutionExp() > pkReadySolinfo.GetEvolutionExp())
                     {
                         pkSolinfo = pkReadySolinfo;
                     }
                 }
                 else
                 {
                     eElement_Msg = eElement_MsgType.eElement_OK;
                     pkSolinfo    = pkReadySolinfo;
                 }
             }
             else if (eElement_Msg < eElement_MsgType.eElement_NEEDGRADE)
             {
                 eElement_Msg = eElement_MsgType.eElement_SOLHEIGHT;
                 pkSolinfo    = pkReadySolinfo;
             }
             else if (eElement_Msg == eElement_MsgType.eElement_SOLHEIGHT && pkSolinfo.GetEvolutionExp() > pkReadySolinfo.GetEvolutionExp())
             {
                 pkSolinfo = pkReadySolinfo;
             }
         }
         else if (eElement_Msg < eElement_MsgType.eElement_NEEDGRADE)
         {
             eElement_Msg = eElement_MsgType.eElement_NEEDGRADE;
             pkSolinfo    = pkReadySolinfo;
         }
         else if (eElement_Msg == eElement_MsgType.eElement_NEEDGRADE && pkSolinfo.GetEvolutionExp() > pkReadySolinfo.GetEvolutionExp())
         {
             pkSolinfo = pkReadySolinfo;
         }
     }
     else if (eElement_Msg < eElement_MsgType.eElement_NEEDEXP)
     {
         eElement_Msg = eElement_MsgType.eElement_NEEDEXP;
         pkSolinfo    = pkReadySolinfo;
     }
     else if (eElement_Msg == eElement_MsgType.eElement_NEEDEXP && pkSolinfo.GetEvolutionExp() > pkReadySolinfo.GetEvolutionExp())
     {
         pkSolinfo = pkReadySolinfo;
     }
 }
Exemple #15
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);
    }
Exemple #16
0
    public void SetSolderinfo()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i);
            if (!soldierInfo.IsValid())
            {
                base.SetShowLayer(i, false);
            }
            else
            {
                this.m_itSolPortrait[i].SetSolImageTexure(eCharImageType.SMALL, soldierInfo.GetCharKind(), (int)soldierInfo.GetGrade());
                this.m_pbSolHP[i].Value = (float)soldierInfo.GetHP() / (float)soldierInfo.GetMaxHP();
                this.SetToolTip(i, soldierInfo);
                this.m_pbSolHP[i].Visible = false;
                this.m_pbBG[i].Visible    = false;
            }
        }
    }
Exemple #17
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();
    }
    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));
    }
Exemple #19
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);
    }
Exemple #20
0
    private void CalcDummyExtractData(NkSoldierInfo solInfo)
    {
        if (solInfo == null)
        {
            return;
        }
        int num = NrTSingleton <NrSolExtractRateManager> .Instance.GetSolExtractRateItemInfo(solInfo.GetSeason(), (int)solInfo.GetGrade(), false);

        num = (int)((float)num / 100f);
        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2857"),
            "count",
            string.Format("{0:F2}", num)
        });

        this.lbExtractPercentage.SetText(empty);
    }
Exemple #21
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();
    }
Exemple #22
0
    private NewListItem GetTranScendenceMaterialSolItem(NkSoldierInfo solInfo, bool visibleCloseButton)
    {
        if (solInfo == null || this.GetListBox() == null)
        {
            return(null);
        }
        NewListBox       listBox     = this.GetListBox();
        NewListItem      newListItem = new NewListItem(listBox.ColumnNum, true, string.Empty);
        UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(solInfo.GetCharKind(), (int)solInfo.GetGrade());

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

        newListItem.SetListItemData(2, legendName, null, null, null);
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[]
        {
            textFromInterface,
            "count1",
            solInfo.GetLevel(),
            "count2",
            solInfo.GetSolMaxLevel()
        });

        newListItem.SetListItemData(3, textFromInterface, null, null, null);
        newListItem.SetListItemData(4, false);
        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3274"),
            "season",
            solInfo.GetSeason() + 1
        });

        newListItem.SetListItemData(5, empty, null, null, null);
        newListItem.SetListItemData(6, false);
        newListItem.SetListItemData(7, false);
        newListItem.SetListItemData(8, true);
        newListItem.SetListItemData(9, false);
        newListItem.SetListItemData(10, "0/100", null, null, null);
        newListItem.SetListItemData(11, false);
        newListItem.SetListItemData(13, false);
        newListItem.SetListItemData(12, string.Empty, solInfo.GetSolID(), new EZValueChangedDelegate(this.OnClickTrnScendenceMaterialCancel), null);
        newListItem.SetListItemData(12, visibleCloseButton);
        newListItem.Data = solInfo.GetSolID();
        return(newListItem);
    }
Exemple #23
0
    private NewListItem GetExtracteSolItem(NkSoldierInfo solInfo)
    {
        NewListItem      newListItem = new NewListItem(this.GetListBox().ColumnNum, true, string.Empty);
        UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(solInfo.GetCharKind(), (int)solInfo.GetGrade());

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

        newListItem.SetListItemData(3, legendName, null, null, null);
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("167");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[]
        {
            textFromInterface,
            "count1",
            solInfo.GetLevel(),
            "count2",
            solInfo.GetSolMaxLevel()
        });

        newListItem.SetListItemData(4, textFromInterface, null, null, null);
        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3274"),
            "season",
            solInfo.GetSeason() + 1
        });

        newListItem.SetListItemData(5, empty, null, null, null);
        newListItem.SetListItemData(6, false);
        newListItem.SetListItemData(7, false);
        newListItem.SetListItemData(8, false);
        newListItem.SetListItemData(9, string.Empty, solInfo.GetSolID(), new EZValueChangedDelegate(this.OnClickRemove), null);
        newListItem.Data = solInfo.GetSolID();
        return(newListItem);
    }
    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);
    }
Exemple #25
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);
            }
        }
    }
 public static int COMPARE_GRADE(NkSoldierInfo a, NkSoldierInfo b)
 {
     return(b.GetGrade().CompareTo(a.GetGrade()));
 }
Exemple #27
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);
    }
Exemple #28
0
    private void SetComposeSolBase(bool setting, NkSoldierInfo solInfo)
    {
        if (solInfo == null)
        {
            return;
        }
        this.btnBaseSelect.SetButtonTextureKey("Win_B_Change");
        this.lblBaseGuideText.Visible = false;
        if (this.GetListBox() != null && this.GetListBox().Count == 0)
        {
            this.btnSubSelectMain.Visible = true;
            this.btnSubSelect.Visible     = true;
            this.btnSubSelect.SetButtonTextureKey("Win_B_Addlist");
            this.dtExpBG.Visible              = false;
            this.lblExp.Visible               = false;
            this.lblGradeText.Visible         = false;
            this.lblMaterialGuideText.Visible = true;
        }
        else
        {
            this.btnSubSelect.SetButtonTextureKey("Win_B_Change");
            this.btnSubSelectMain.Visible     = false;
            this.dtExpBG.Visible              = true;
            this.lblExp.Visible               = true;
            this.lblGradeText.Visible         = true;
            this.lblMaterialGuideText.Visible = false;
        }
        this.lblComposeText.Visible = true;
        if (solInfo != null)
        {
            this.dtBase.SetTexture(eCharImageType.LARGE, solInfo.GetCharKind(), (int)(solInfo.GetGrade() + 2), string.Empty);
        }
        this.dtBase.Visible = setting;
        if (solInfo != null)
        {
            UIBaseInfoLoader solLargeGradeImg = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(solInfo.GetCharKind(), (int)solInfo.GetGrade());

            if (0 < NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(solInfo.GetCharKind(), (int)solInfo.GetGrade()))
            {
                this.SolRank.SetSize(solLargeGradeImg.UVs.width, solLargeGradeImg.UVs.height);
            }
            this.SolRank.SetTexture(solLargeGradeImg);
        }
        this.SolRank.Visible = setting;
        if (solInfo != null)
        {
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3274"),
                "season",
                solInfo.GetSeason() + 1
            });

            this.lblBaseSeasonText.SetText(empty);
        }
        this.lblBaseSeasonText.Visible = setting;
        this.lblExp.Visible            = setting;
        this.lblExp.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("286"));
        this.lblComposeCost.SetText(string.Format("{0:###,###,###,##0}", 0));
        this.lblComposeCost.Visible = setting;
        if (solInfo != null)
        {
            string empty2 = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("290"),
                "targetname",
                solInfo.GetName(),
                "count1",
                solInfo.GetLevel().ToString(),
                "count2",
                solInfo.GetSolMaxLevel().ToString()
            });

            this.lbBaseName.SetText(empty2);
        }
        this.lbBaseName.Visible = setting;
        float num = 1f;

        this.dtGage.SetSize(this.GAGE_SRC_WIDTH * num, this.dtGage.GetSize().y);
        this.dtGage.Visible       = setting;
        this.GradeExpBG.Visible   = setting;
        this.GradeExpGage.Visible = setting;
        this.GradeExpText.Visible = setting;
        this.lblGradeText.Visible = setting;
        float num2 = 0.8f;

        if (this.GetListBox() != null && 0 < this.GetListBox().Count)
        {
            this.GradeExpGage.SetSize(414f, this.GradeExpGage.height);
        }
        else
        {
            this.GradeExpGage.SetSize(414f * num2, this.GradeExpGage.height);
        }
        if (solInfo != null)
        {
            int  num3 = 2000;
            long num4 = solInfo.GetNextEvolutionExp() - solInfo.GetCurBaseEvolutionExp();
            long num5 = num4 - (long)num3;
            if (this.GetListBox() != null && 0 < this.GetListBox().Count)
            {
                num5 = num4;
            }
            string empty3 = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty3, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1871"),
                "exp",
                num5.ToString(),
                "maxexp",
                num4.ToString()
            });

            this.GradeExpText.SetText(empty3);
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty3, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3273"),
                "evolexp",
                num3.ToString()
            });

            this.lblGradeText.SetText(empty3);
        }
        this.GradeExpText.Visible = setting;
        this.lblGradeText.Visible = setting;
        this.btnOk.Visible        = (solInfo != null);
    }
    private void OnClickMythEvolution_OK(IUIObject obj)
    {
        NkSoldierInfo soldierInfo = this.GetSoldierInfo(this.m_i64SolID);

        if (soldierInfo == null)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("508"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo != null)
        {
            long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_MYTH_EVOLUTION_TIME);
            long curTime     = PublicMethod.GetCurTime();
            if (curTime > charSubData)
            {
                MYTH_EVOLUTION myth_EvolutionSeason = NrTSingleton <NrTableMyth_EvolutionManager> .Instance.GetMyth_EvolutionSeason((byte)(soldierInfo.GetSeason() + 1));

                if (myth_EvolutionSeason != null)
                {
                    string empty = string.Empty;
                    if (NkUserInventory.GetInstance().Get_First_ItemCnt(myth_EvolutionSeason.m_i32SpendItemUnique1) < myth_EvolutionSeason.m_i32SpendItemNum1)
                    {
                        string itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(myth_EvolutionSeason.m_i32SpendItemUnique1);

                        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                        {
                            NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("780"),
                            "target",
                            itemNameByItemUnique
                        });

                        Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE);
                        return;
                    }
                    if (NkUserInventory.GetInstance().Get_First_ItemCnt(myth_EvolutionSeason.m_i32SpendItemUnique2) < myth_EvolutionSeason.m_i32SpendItemNum2)
                    {
                        string itemNameByItemUnique2 = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(myth_EvolutionSeason.m_i32SpendItemUnique2);

                        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                        {
                            NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("780"),
                            "target",
                            itemNameByItemUnique2
                        });

                        Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE);
                        return;
                    }
                    if (soldierInfo.GetGrade() >= 6 && soldierInfo.GetGrade() < 10)
                    {
                        GS_MYTH_EVOLUTION_SOL_REQ gS_MYTH_EVOLUTION_SOL_REQ = new GS_MYTH_EVOLUTION_SOL_REQ();
                        gS_MYTH_EVOLUTION_SOL_REQ.i64SolID = this.m_i64SolID;
                        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_MYTH_EVOLUTION_SOL_REQ, gS_MYTH_EVOLUTION_SOL_REQ);
                        this.Close();
                    }
                }
            }
        }
    }
    private void InsertList(SolComposeListDlg.SOL_LIST_INSERT_TYPE eIndex)
    {
        if (SolComposeMainDlg.Instance == null)
        {
            this.OnClose();
            return;
        }
        this.mSortList.Clear();
        this.mCheckList.Clear();
        bool flag  = eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.ALL || eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.BATTLE;
        bool flag2 = eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.ALL || eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.WAIT;
        bool flag3 = eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.ALL || eIndex == SolComposeListDlg.SOL_LIST_INSERT_TYPE.WAREHOUSE;

        if (!this.m_bMainSelect)
        {
            flag  = false;
            flag2 = true;
            flag3 = false;
        }
        if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo != null)
        {
            NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

            if (flag && charPersonInfo != null)
            {
                for (int i = 0; i < 6; i++)
                {
                    NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i);
                    if (soldierInfo != null)
                    {
                        if (soldierInfo.GetSolID() > 0L)
                        {
                            if (this.m_bMainSelect || !soldierInfo.IsLeader())
                            {
                                if (this.m_eShowType == SOLCOMPOSE_TYPE.TRANSCENDENCE)
                                {
                                    if (this.m_bMainSelect)
                                    {
                                        if (soldierInfo.GetGrade() < 6)
                                        {
                                            goto IL_152;
                                        }
                                        if (soldierInfo.GetGrade() == 9 || soldierInfo.GetGrade() >= 13)
                                        {
                                            goto IL_152;
                                        }
                                    }
                                }
                                else if (this.m_eShowType == SOLCOMPOSE_TYPE.COMPOSE && !this.IsAddComposeList(soldierInfo))
                                {
                                    goto IL_152;
                                }
                                this.mSortList.Add(soldierInfo);
                            }
                        }
                    }
                    IL_152 :;
                }
            }
            if (flag2)
            {
                NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

                foreach (NkSoldierInfo current in readySolList.GetList().Values)
                {
                    if (this.m_bMainSelect && this.m_eShowType == SOLCOMPOSE_TYPE.TRANSCENDENCE)
                    {
                        if (current.GetSolPosType() != 0 && current.GetSolPosType() != 2)
                        {
                            continue;
                        }
                    }
                    else if (current.GetSolPosType() != 0)
                    {
                        continue;
                    }
                    if (this.m_bMainSelect || NrTSingleton <NkCharManager> .Instance.GetMyCharInfo().GetFaceSolID() != current.GetSolID())
                    {
                        switch (this.m_eShowType)
                        {
                        case SOLCOMPOSE_TYPE.COMPOSE:
                            if (!this.IsAddComposeList(current))
                            {
                                continue;
                            }
                            if (!this.m_bMainSelect)
                            {
                                if (current.GetGrade() >= 6)
                                {
                                    continue;
                                }
                                if (current.IsAtbCommonFlag(1L))
                                {
                                    continue;
                                }
                            }
                            break;

                        case SOLCOMPOSE_TYPE.EXTRACT:
                            if (current.GetGrade() < 5)
                            {
                                continue;
                            }
                            if (current.GetGrade() >= 6)
                            {
                                continue;
                            }
                            if (current.IsAtbCommonFlag(1L))
                            {
                                continue;
                            }
                            break;

                        case SOLCOMPOSE_TYPE.TRANSCENDENCE:
                            if (current.GetGrade() < 6)
                            {
                                continue;
                            }
                            if (!this.m_bMainSelect)
                            {
                                if (current.IsAtbCommonFlag(1L))
                                {
                                    continue;
                                }
                            }
                            else if (current.GetGrade() == 9 || current.GetGrade() >= 13)
                            {
                                continue;
                            }
                            break;
                        }
                        this.mSortList.Add(current);
                    }
                }
            }
            if (flag3 && this.m_bMainSelect)
            {
                List <NkSoldierInfo> solWarehouseList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetSolWarehouseList();

                foreach (NkSoldierInfo current2 in solWarehouseList)
                {
                    if (current2.GetSolPosType() == 5)
                    {
                        switch (this.m_eShowType)
                        {
                        case SOLCOMPOSE_TYPE.COMPOSE:
                            if (!this.IsAddComposeList(current2))
                            {
                                continue;
                            }
                            if (!this.m_bMainSelect && current2.IsAtbCommonFlag(1L))
                            {
                                continue;
                            }
                            break;

                        case SOLCOMPOSE_TYPE.TRANSCENDENCE:
                            if (current2.GetGrade() < 6)
                            {
                                continue;
                            }
                            if (current2.GetGrade() == 9 || current2.GetGrade() >= 13)
                            {
                                continue;
                            }
                            break;
                        }
                        this.mSortList.Add(current2);
                    }
                }
            }
            if (!this.m_bMainSelect && SolComposeMainDlg.Instance.mBaseSol != null)
            {
                this.mSortList.Remove(SolComposeMainDlg.Instance.mBaseSol);
            }
            if (this.m_bMainSelect)
            {
                List <long> list = new List <long>();
                list.AddRange(SolComposeMainDlg.Instance.SUB_ARRAY);
                if (list.Count != 0)
                {
                    List <NkSoldierInfo> list2 = new List <NkSoldierInfo>();
                    foreach (NkSoldierInfo current3 in this.mSortList)
                    {
                        for (int j = 0; j < list.Count; j++)
                        {
                            if (current3.GetSolID() == list[j])
                            {
                                list2.Add(current3);
                            }
                        }
                    }
                    for (int k = 0; k < list2.Count; k++)
                    {
                        this.mSortList.Remove(list2[k]);
                    }
                    list2.Clear();
                }
            }
            if (!this.m_bMainSelect && SolComposeMainDlg.Instance != null)
            {
                this.mCheckList.AddRange(SolComposeMainDlg.Instance.SUB_ARRAY);
            }
        }
        this.ddList1.SetIndex((int)eIndex);
        this.ddList1.RepositionItems();
        this.ChangeSortDDL(null);
    }