Exemplo n.º 1
0
    private void SetSolDetailInfo()
    {
        if (this.pkSolinfo == null)
        {
            return;
        }
        this.SetCostumeButton();
        this.pkSolinfo.UpdateSoldierStatInfo();
        NrCharKindInfo charKindInfo = this.pkSolinfo.GetCharKindInfo();

        if (charKindInfo == null)
        {
            return;
        }
        this.m_SolInterfaceTool.m_kSelectCharKindInfo = charKindInfo;
        this.m_SolInterfaceTool.SetHeroEventLabel(this.pkSolinfo.GetGrade() + 1);
        string costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(this.m_selectedSolCostumeUnique);

        this.m_SolInterfaceTool.SetCharImg(this.pkSolinfo.GetGrade(), costumePortraitPath);
        this.m_SolInterfaceTool.m_Label_Rank2.Visible = false;
        if (!NrTSingleton <ContentsLimitManager> .Instance.IsReincarnation())
        {
            if (charKindInfo.IsATB(1L))
            {
                this.m_SolInterfaceTool.m_DrawTexture_rank.Visible = false;
            }
            else
            {
                this.m_SolInterfaceTool.m_DrawTexture_rank.Visible = true;
            }
        }
        else
        {
            this.m_SolInterfaceTool.m_DrawTexture_rank.Visible = true;
        }
        SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);

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

        sUBDATA_UNION2.nSubData = this.pkSolinfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_VITINT);
        int statSTR = this.pkSolinfo.GetStatSTR();
        int statDEX = this.pkSolinfo.GetStatDEX();
        int statVIT = this.pkSolinfo.GetStatVIT();
        int statINT = this.pkSolinfo.GetStatINT();

        this.ShowBaseSolStatAwakening(this.SolSTR, statSTR, sUBDATA_UNION.n32SubData_0);
        this.ShowBaseSolStatAwakening(this.SolDEX, statDEX, sUBDATA_UNION.n32SubData_1);
        this.ShowBaseSolStatAwakening(this.SolVIT, statVIT, sUBDATA_UNION2.n32SubData_0);
        this.ShowBaseSolStatAwakening(this.SolINT, statINT, sUBDATA_UNION2.n32SubData_1);
        string text = string.Empty;

        if (charKindInfo.GetCHARKIND_ATTACKINFO().ATTACKTYPE == this.pkSolinfo.GetAttackInfo().ATTACKTYPE)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(charKindInfo.GetCHARKIND_INFO().SoldierSpec1);
        }
        else
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(charKindInfo.GetCHARKIND_INFO().SoldierSpec2);
        }
        this.m_lbSoldierSpec.SetText(text);
        this.SolExplain.SetScrollLabel(charKindInfo.GetDesc());
        int value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_TRADECOUNT_USE);

        this.TradeCount.Hide(true);
        if (value == 1)
        {
            this.TradeCount.Hide(true);
            this.TradeCountName.Hide(false);
            byte tradeRank = this.pkSolinfo.GetCharKindInfo().GetTradeRank((int)this.pkSolinfo.GetGrade());
            if (tradeRank == 0 || this.pkSolinfo.GetGrade() < tradeRank - 1)
            {
                if (tradeRank == 0)
                {
                    this.TradeCountName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1980"));
                }
                else if (!this.pkSolinfo.IsAwakening())
                {
                    string empty = string.Empty;
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1979"),
                        "count",
                        tradeRank
                    });

                    this.TradeCountName.SetText(empty);
                }
                else
                {
                    this.TradeCountName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2346"));
                }
            }
            else if (!this.pkSolinfo.IsAwakening())
            {
                this.TradeCountName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1206"));
                long solSubData = this.pkSolinfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_TRADE_COUNT);
                this.TradeCount.SetText(solSubData.ToString());
                this.TradeCount.Hide(false);
            }
            else
            {
                this.TradeCountName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2346"));
            }
        }
        else
        {
            this.TradeCountName.Hide(true);
        }
        this.IntroMovieButton.Visible = false;
        this.IntroMoveieText.Visible  = false;
        this.m_btnSolPreview.Visible  = false;
        if (charKindInfo.IsATB(1L))
        {
            this.IntroMovieButton.Visible = true;
            this.IntroMoveieText.Visible  = true;
        }
        else
        {
            this.m_btnSolPreview.Visible = true;
        }
        this.SetInitiativeValue();
        if (this.pkSolinfo.IsAtbCommonFlag(8L))
        {
            this.m_cOnlySkill.SetCheckState(1);
        }
        else
        {
            this.m_cOnlySkill.SetCheckState(0);
        }
    }
Exemplo n.º 2
0
    public void SetSeleteSol(long nSolID)
    {
        NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

        NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(nSolID);

        if (soldierInfoFromSolID == null)
        {
            base.SetShowLayer(1, true);
            base.SetShowLayer(2, false);
        }
        else
        {
            base.SetShowLayer(1, false);
            base.SetShowLayer(2, true);
            string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("567");

            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                textFromInterface,
                "targetname",
                soldierInfoFromSolID.GetName(),
                "count",
                soldierInfoFromSolID.GetLevel().ToString()
            });

            string         text         = string.Empty;
            NrCharKindInfo charKindInfo = soldierInfoFromSolID.GetCharKindInfo();
            if (charKindInfo != null)
            {
                if (charKindInfo.GetCHARKIND_ATTACKINFO().ATTACKTYPE == soldierInfoFromSolID.GetAttackInfo().ATTACKTYPE)
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(charKindInfo.GetCHARKIND_INFO().SoldierSpec1);
                }
                else
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(charKindInfo.GetCHARKIND_INFO().SoldierSpec2);
                }
            }
            string textFromInterface2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("992");

            string empty2 = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
            {
                textFromInterface2,
                "type",
                text
            });

            int    num   = 0;
            string text2 = string.Empty;
            List <BATTLESKILL_TRAINING> battleSkillTrainingGroup = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillTrainingGroup(soldierInfoFromSolID);

            if (battleSkillTrainingGroup != null)
            {
                foreach (BATTLESKILL_TRAINING current in battleSkillTrainingGroup)
                {
                    int nSkillUnique = current.m_nSkillUnique;
                    BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(nSkillUnique);

                    if (battleSkillBase != null)
                    {
                        if (!soldierInfoFromSolID.IsCostumeEquip() || this.IsCostumeSkill(soldierInfoFromSolID, nSkillUnique))
                        {
                            num   = soldierInfoFromSolID.GetBattleSkillLevel(current.m_nSkillUnique);
                            text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey);

                            break;
                        }
                    }
                }
            }
            string textFromInterface3 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1292");

            string empty3 = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty3, new object[]
            {
                textFromInterface3,
                "skillname",
                text2,
                "skilllevel",
                num.ToString()
            });

            this.m_lCharName.Text  = empty;
            this.m_lCharType.Text  = empty2;
            this.m_lSkillInfo.Text = empty3;
        }
        this.GuildBossBattleUserName();
    }