示例#1
0
    public void SetSolKind(int i32CharKind, byte bGrade, int level)
    {
        NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(i32CharKind);

        if (charKindInfo == null)
        {
            TsLog.LogOnlyEditor("!!!! SOL CHARKIND ERROR {0}" + i32CharKind + " !!");
            return;
        }
        this.m_SolInterfaceTool.m_kSelectCharKindInfo = charKindInfo;
        this.m_SolInterfaceTool.SetCharImg(bGrade - 1, string.Empty);
        this.m_SolInterfaceTool.SetHeroEventLabel(bGrade);
        this.m_SolInterfaceTool.SetSkillInfo_MaxLevel();
        this.m_Button_MovieBtn.data = i32CharKind;
        int num  = charKindInfo.GetGradePlusSTR((int)(bGrade - 1));
        int num2 = charKindInfo.GetGradePlusDEX((int)(bGrade - 1));
        int num3 = charKindInfo.GetGradePlusINT((int)(bGrade - 1));
        int num4 = charKindInfo.GetGradePlusVIT((int)(bGrade - 1));

        num  += charKindInfo.GetIncSTR((int)(bGrade - 1), level);
        num2 += charKindInfo.GetIncDEX((int)(bGrade - 1), level);
        num3 += charKindInfo.GetIncINT((int)(bGrade - 1), level);
        num4 += charKindInfo.GetIncVIT((int)(bGrade - 1), level);
        this.m_Label_Stats_str2.SetText(num.ToString());
        this.m_Label_Stats_dex2.SetText(num2.ToString());
        this.m_Label_Stats_vit2.SetText(num4.ToString());
        this.m_Label_Stats_int2.SetText(num3.ToString());
        this.m_ScrollLabel_SolInfo.SetScrollLabel(charKindInfo.GetDesc());
        this.m_cMythSkillControl.ShowInfo(i32CharKind, (int)bGrade);
    }
示例#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);
    }
示例#3
0
    public void SetSolKind(SolSlotData SlotData)
    {
        if (SlotData == null)
        {
            return;
        }
        this.m_SelectSlotData = SlotData;
        NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(this.m_SelectSlotData.i32KindInfo);

        if (charKindInfo == null)
        {
            TsLog.LogOnlyEditor("!!!! SOL CHARKIND ERROR {0}" + this.m_SelectSlotData.i32KindInfo + " !!");
            return;
        }
        this.m_SolInterfaceTool.m_kSelectCharKindInfo = charKindInfo;
        this.m_SolInterfaceTool.SetCharImg(this.m_SelectSlotData.bSolGrade - 1, string.Empty);
        this.m_SolInterfaceTool.SetHeroEventLabel(this.m_SelectSlotData.bSolGrade);
        this.m_SolInterfaceTool.SetSkillIcon();
        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;
        }
        this.m_Button_MovieBtn.data = this.m_SelectSlotData.i32KindInfo;
        bool visible = NrTSingleton <NrCharCostumeTableManager> .Instance.IsCostumeKind(charKindInfo.GetCharKind());

        if (NrTSingleton <ContentsLimitManager> .Instance.IsCostumeLimit())
        {
            visible = false;
        }
        this.m_Button_Costume.Visible = visible;
        this.m_Label_Costume.Visible  = visible;
        BASE_SOLGRADEINFO cHARKIND_SOLGRADEINFO = charKindInfo.GetCHARKIND_SOLGRADEINFO((int)(this.m_SelectSlotData.bSolGrade - 1));

        if (cHARKIND_SOLGRADEINFO != null)
        {
            int num  = charKindInfo.GetGradePlusSTR((int)(this.m_SelectSlotData.bSolGrade - 1));
            int num2 = charKindInfo.GetGradePlusDEX((int)(this.m_SelectSlotData.bSolGrade - 1));
            int num3 = charKindInfo.GetGradePlusINT((int)(this.m_SelectSlotData.bSolGrade - 1));
            int num4 = charKindInfo.GetGradePlusVIT((int)(this.m_SelectSlotData.bSolGrade - 1));
            num  += charKindInfo.GetIncSTR((int)(this.m_SelectSlotData.bSolGrade - 1), (int)charKindInfo.GetGradeMaxLevel((short)(this.m_SelectSlotData.bSolGrade - 1)));
            num2 += charKindInfo.GetIncDEX((int)(this.m_SelectSlotData.bSolGrade - 1), (int)charKindInfo.GetGradeMaxLevel((short)(this.m_SelectSlotData.bSolGrade - 1)));
            num3 += charKindInfo.GetIncINT((int)(this.m_SelectSlotData.bSolGrade - 1), (int)charKindInfo.GetGradeMaxLevel((short)(this.m_SelectSlotData.bSolGrade - 1)));
            num4 += charKindInfo.GetIncVIT((int)(this.m_SelectSlotData.bSolGrade - 1), (int)charKindInfo.GetGradeMaxLevel((short)(this.m_SelectSlotData.bSolGrade - 1)));
            this.m_Label_Stats_str2.SetText(num.ToString());
            this.m_Label_Stats_dex2.SetText(num2.ToString());
            this.m_Label_Stats_vit2.SetText(num4.ToString());
            this.m_Label_Stats_int2.SetText(num3.ToString());
        }
        else
        {
            this.m_Label_Stats_str2.SetText("0");
            this.m_Label_Stats_dex2.SetText("0");
            this.m_Label_Stats_vit2.SetText("0");
            this.m_Label_Stats_int2.SetText("0");
        }
        this.m_ScrollLabel_info.SetScrollLabel(charKindInfo.GetDesc());
        if (!NrTSingleton <ContentsLimitManager> .Instance.IsElementKind(charKindInfo.GetCharKind()))
        {
            if (!NrTSingleton <NrTableSolGuideManager> .Instance.GetCharKindAlchemy(charKindInfo.GetCharKind()))
            {
                this.m_Toolbar.Control_Tab[2].Visible = false;
            }
            else
            {
                this.m_Toolbar.Control_Tab[2].Visible = true;
                CHARKIND_SOLDIERINFO guide_Col = NrTSingleton <NrBaseTableManager> .Instance.GetGuide_Col(charKindInfo.GetCharKind());

                if (guide_Col != null)
                {
                    int[]  array  = new int[5];
                    byte[] array2 = new byte[5];
                    for (int i = 0; i < 5; i++)
                    {
                        array[i]  = guide_Col.kElement_CharData[i].GetCharCharKind();
                        array2[i] = guide_Col.kElement_CharData[i].GetCharCharRank();
                    }
                    SolDetail_Info_Dlg solDetail_Info_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLDETAIL_DLG) as SolDetail_Info_Dlg;

                    solDetail_Info_Dlg.SetElEmentMaterial(guide_Col.i32BaseCharKind, guide_Col.bBaseRank, array, array2, guide_Col.i64NeedMoney);
                }
            }
        }
        if (Scene.CurScene == Scene.Type.SOLDIER_BATCH)
        {
            this.m_Toolbar.Control_Tab[2].Visible = false;
            this.m_Toolbar.Control_Tab[1].Visible = false;
        }
        this.m_cMythSkillControl.ShowInfo(SlotData);
    }