Esempio n. 1
0
    public void SetMallItem(ITEM_MALL_ITEM MallItem, int i32CharKind)
    {
        this.m_DrawTexture_Won.SetTexture(ItemMallItemManager.GetCashTextureName((eITEMMALL_MONEY_TYPE)MallItem.m_nMoneyType));
        this.m_Label_Price.Text        = ItemMallItemManager.GetCashPrice(MallItem);
        this.m_Button_Price.Data       = MallItem;
        this.m_Label_Price.Visible     = true;
        this.m_Button_Price.Visible    = true;
        this.m_DrawTexture_Won.Visible = true;
        byte             b     = 6;
        int              level = 50;
        List <SOL_GUIDE> value = NrTSingleton <NrTableSolGuideManager> .Instance.GetValue();

        foreach (SOL_GUIDE current in value)
        {
            if (current.m_i32CharKind == i32CharKind)
            {
                b = (byte)current.m_iSolGrade;
            }
        }
        NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(i32CharKind);

        if (i32CharKind != 0)
        {
            level = (int)charKindInfo.GetGradeMaxLevel((short)(b - 1));
        }
        this.SetSolKind(i32CharKind, b, level);
        this.m_eParentUI = G_ID.ITEMMALL_DLG;
    }
    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);
    }
Esempio n. 3
0
    public void SetTimeShopItem(TIMESHOP_DATA _pTimeShopItem, int _i32CharKind)
    {
        if (_pTimeShopItem == null)
        {
            return;
        }
        this.m_DrawTexture_Won.SetTexture(NrTSingleton <NrTableTimeShopManager> .Instance.Get_MoneyTypeTextureName((eTIMESHOP_MONEYTYPE)_pTimeShopItem.m_nMoneyType));
        this.m_Label_Price.Text        = _pTimeShopItem.m_lPrice.ToString();
        this.m_Button_Price.Data       = _pTimeShopItem;
        this.m_Label_Price.Visible     = true;
        this.m_Button_Price.Visible    = true;
        this.m_DrawTexture_Won.Visible = true;
        if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.IsBuy_TimeShopItemByIDX(_pTimeShopItem.m_lIdx))
        {
            this.m_Button_Price.SetEnabled(false);
            this.m_Label_Price.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3341");

            this.m_DrawTexture_Won.Visible = false;
        }
        byte           b            = 6;
        int            level        = 50;
        string         strSolKind   = string.Empty;
        NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(_i32CharKind);

        if (charKindInfo != null)
        {
            strSolKind = charKindInfo.GetCode();
        }
        ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(_pTimeShopItem.m_nItemUnique);

        if (itemInfo != null)
        {
            b = (byte)(itemInfo.m_nParam[1] + 1);
            if (b <= 1)
            {
                b = NrTSingleton <ItemManager> .Instance.GetTopGrade_GroupSolTicket((long)_pTimeShopItem.m_nItemUnique, strSolKind);
            }
            if (b > 15)
            {
                b = 15;
            }
        }
        else
        {
            List <SOL_GUIDE> value = NrTSingleton <NrTableSolGuideManager> .Instance.GetValue();

            foreach (SOL_GUIDE current in value)
            {
                if (current.m_i32CharKind == _i32CharKind)
                {
                    b = (byte)current.m_iSolGrade;
                }
            }
        }
        if (charKindInfo != null)
        {
            level = (int)charKindInfo.GetGradeMaxLevel((short)(b - 1));
        }
        this.SetSolKind(_i32CharKind, b, level);
        this.m_eParentUI = G_ID.TIMESHOP_DLG;
    }
    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();
    }
Esempio n. 5
0
    public void _LinkSolDataInfiBattle()
    {
        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)
            {
                NkListSolInfo nkListSolInfo = new NkListSolInfo();
                nkListSolInfo.SolCharKind     = current.CharKind;
                nkListSolInfo.SolGrade        = current.SolGrade;
                nkListSolInfo.SolInjuryStatus = current.bInjury;
                nkListSolInfo.SolLevel        = current.i16Level;
                nkListSolInfo.ShowLevel       = true;
                if (NrTSingleton <NrCharCostumeTableManager> .Instance.IsCostumeUniqueEqualSolKind(current.i32CostumeUnique, current.CharKind))
                {
                    nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(current.i32CostumeUnique);
                }
                EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(current.CharKind, (byte)current.SolGrade);

                Texture2D portraitLeaderSol = this.GetPortraitLeaderSol(current.CharKind);
                if (portraitLeaderSol != null)
                {
                    newListItem.SetListItemData(1, portraitLeaderSol, null, null, null, null);
                }
                else
                {
                    if (eventHeroCharCode != null)
                    {
                        newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null);
                        newListItem.EventMark = true;
                    }
                    else
                    {
                        UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(current.CharKind, current.SolGrade);

                        if (legendFrame != null)
                        {
                            newListItem.SetListItemData(0, legendFrame, null, null, null);
                        }
                    }
                    newListItem.SetListItemData(1, nkListSolInfo, null, null, null);
                }
                string text = string.Empty;
                if (NrTSingleton <NrCharKindInfoManager> .Instance.IsUserCharKind(current.CharKind))
                {
                    text = TKString.NEWString(this.m_InfiBattleInfo.strAttackName);
                }
                else
                {
                    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
                });

                short  gradeMaxLevel = charKindInfo.GetGradeMaxLevel((short)((byte)current.SolGrade));
                string str           = string.Empty;
                if (gradeMaxLevel <= current.i16Level)
                {
                    str = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("286");
                }
                else
                {
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref str, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1802"),
                        "exp",
                        ANNUALIZED.Convert(current.i32AddExp)
                    });
                }
                text2 += "\r\n";
                text2 += str;
                newListItem.SetListItemData(2, text2, null, null, null);
                this.m_lbSolList.Add(newListItem);
                this.m_lbSolList.RepositionItems();
                num++;
                if (nkListSolInfo.SolInjuryStatus)
                {
                    this.m_nInjurySolCount++;
                }
            }
        }
    }
Esempio n. 6
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);
    }