public void InitCostumeSlotData(CostumeGuide_Dlg owner, ref Dictionary <byte, List <SolSlotData> > slotDataDic)
        {
            if (slotDataDic == null || owner == null)
            {
                return;
            }
            List <int> costumeKindList = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumeKindList();

            foreach (int current in costumeKindList)
            {
                NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(current);

                if (charKindInfo != null)
                {
                    SOL_GUIDE solGuild = NrTSingleton <NrTableSolGuideManager> .Instance.GetSolGuild(current);

                    if (solGuild != null)
                    {
                        SolSlotData item = new SolSlotData(charKindInfo.GetName(), solGuild.m_i32CharKind, (byte)solGuild.m_iSolGrade, solGuild.m_bFlagSet, solGuild.m_bFlagSetCount - 1, solGuild.m_bSeason, solGuild.m_i32SkillUnique, solGuild.m_i32SkillText);
                        if (!slotDataDic.ContainsKey(solGuild.m_bSeason))
                        {
                            slotDataDic.Add(solGuild.m_bSeason, new List <SolSlotData>());
                        }
                        if (!slotDataDic.ContainsKey(owner.ENTIRE_SEASON))
                        {
                            slotDataDic.Add(owner.ENTIRE_SEASON, new List <SolSlotData>());
                        }
                        slotDataDic[owner.ENTIRE_SEASON].Add(item);
                        slotDataDic[solGuild.m_bSeason].Add(item);
                    }
                }
            }
        }
Beispiel #2
0
    public SolSlotData GetSolGuideData(int iCharKind)
    {
        SolSlotData      result = null;
        List <SOL_GUIDE> value  = NrTSingleton <NrTableSolGuideManager> .Instance.GetValue();

        if (value == null)
        {
            return(result);
        }
        for (int i = 0; i < value.Count; i++)
        {
            SOL_GUIDE sOL_GUIDE = value[i];
            if (sOL_GUIDE != null)
            {
                if (!this.IsSolGuideData(sOL_GUIDE.m_i32CharKind))
                {
                    if (!NrTSingleton <ContentsLimitManager> .Instance.IsSolGuideCharKindInfo(sOL_GUIDE.m_i32CharKind))
                    {
                        if (sOL_GUIDE.m_i32CharKind == iCharKind)
                        {
                            result = new SolSlotData(this.kCharKindInfo.GetName(), sOL_GUIDE.m_i32CharKind, (byte)sOL_GUIDE.m_iSolGrade, sOL_GUIDE.m_bFlagSet, sOL_GUIDE.m_bFlagSetCount - 1, sOL_GUIDE.m_bSeason, sOL_GUIDE.m_i32SkillUnique, sOL_GUIDE.m_i32SkillText);
                            break;
                        }
                    }
                }
            }
        }
        return(result);
    }
Beispiel #3
0
    private void SetGuideTableData(byte bSeason, SolSlotData SlotData)
    {
        List <SolSlotData> list = null;

        if (this.dicSlotData.ContainsKey(bSeason))
        {
            this.dicSlotData.TryGetValue(bSeason, out list);
            if (list == null)
            {
                list = new List <SolSlotData>();
                list.Add(SlotData);
                this.dicSlotData.Add(bSeason, list);
            }
            else
            {
                list.Add(SlotData);
            }
        }
        else
        {
            list = new List <SolSlotData>();
            list.Add(SlotData);
            this.dicSlotData.Add(bSeason, list);
        }
    }
Beispiel #4
0
    private void OnSelectSolSlot(IUIObject obj)
    {
        if (obj == null)
        {
            return;
        }
        int         num          = (int)obj.Data;
        SolSlotData slotListData = this.GetSlotListData(num);

        if (slotListData == null)
        {
            TsLog.LogWarning(" Sol Guide Slot Not Data Button {0}", new object[]
            {
                num
            });
            return;
        }
        if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.SOLDETAIL_DLG) && slotListData != null && slotListData.i32KindInfo != 0)
        {
            SolDetail_Info_Dlg solDetail_Info_Dlg = (SolDetail_Info_Dlg)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLDETAIL_DLG);

            if (!solDetail_Info_Dlg.Visible)
            {
                solDetail_Info_Dlg.Show();
            }
            solDetail_Info_Dlg.SetSolKind(slotListData);
        }
    }
Beispiel #5
0
    private void InitGuideDataSet()
    {
        this.dicSlotData.Clear();
        this.dicSlotData = new Dictionary <byte, List <SolSlotData> >();
        List <SOL_GUIDE> value = NrTSingleton <NrTableSolGuideManager> .Instance.GetValue();

        if (value == null)
        {
            return;
        }
        for (int i = 0; i < value.Count; i++)
        {
            SOL_GUIDE sOL_GUIDE = value[i];
            if (sOL_GUIDE != null)
            {
                this.kCharKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(sOL_GUIDE.m_i32CharKind);

                if (this.kCharKindInfo != null)
                {
                    if (sOL_GUIDE.m_bSeason != 0)
                    {
                        if (!NrTSingleton <ContentsLimitManager> .Instance.IsSolGuide_Season((int)sOL_GUIDE.m_bSeason))
                        {
                            if (!this.IsSolGuideData(sOL_GUIDE.m_i32CharKind))
                            {
                                if (!NrTSingleton <ContentsLimitManager> .Instance.IsSolGuideCharKindInfo(sOL_GUIDE.m_i32CharKind))
                                {
                                    if (sOL_GUIDE.m_i8Legend != 2 || NrTSingleton <NrTableSolGuideManager> .Instance.FindSolInfo(sOL_GUIDE.m_i32CharKind))
                                    {
                                        SolSlotData slotData;
                                        if (this.kCharKindInfo != null)
                                        {
                                            slotData = new SolSlotData(this.kCharKindInfo.GetName(), sOL_GUIDE.m_i32CharKind, (byte)sOL_GUIDE.m_iSolGrade, sOL_GUIDE.m_bFlagSet, sOL_GUIDE.m_bFlagSetCount - 1, sOL_GUIDE.m_bSeason, sOL_GUIDE.m_i32SkillUnique, sOL_GUIDE.m_i32SkillText);
                                        }
                                        else
                                        {
                                            slotData = new SolSlotData(" ", 0, 0, 0, 0, 0, 0, 0);
                                        }
                                        this.SetGuideTableData(0, slotData);
                                        this.SetGuideTableData(sOL_GUIDE.m_bSeason, slotData);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
Beispiel #6
0
 private int CompareSolGradeDescend(SolSlotData a, SolSlotData b)
 {
     if (a.bSolGrade > b.bSolGrade)
     {
         return(1);
     }
     if (a.bSolGrade != b.bSolGrade)
     {
         return(-1);
     }
     if (a.bBitFlagCount < b.bBitFlagCount)
     {
         return(1);
     }
     return(0);
 }
Beispiel #7
0
    private void ClickTicketSellInfoDetail(IUIObject obj)
    {
        int iCharKind = (int)obj.Data;
        TICKET_SELL_INFO ticketSellInfoFromCharKind = this.GetTicketSellInfoFromCharKind(iCharKind);

        if (ticketSellInfoFromCharKind == null)
        {
            return;
        }
        SolSlotData        solSlotData        = SolSlotData.GetSolSlotData(ticketSellInfoFromCharKind.i32CharKind, ticketSellInfoFromCharKind.i8Grade);
        SolDetail_Info_Dlg solDetail_Info_Dlg = (SolDetail_Info_Dlg)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLDETAIL_DLG);

        if (solDetail_Info_Dlg != null && solSlotData != null)
        {
            solDetail_Info_Dlg.SetSolKind(solSlotData);
            solDetail_Info_Dlg.SetTabButtonHide(SolDetail_Info_Dlg.eSOLTOOLBAR.eEIEMENTSOL);
        }
    }
Beispiel #8
0
    public SolSlotData GetSlotListData(int nClickIndex)
    {
        List <SolSlotData> list   = null;
        SolSlotData        result = null;

        if (this.dicSlotData.ContainsKey(this.bCurrentSeason))
        {
            this.dicSlotData.TryGetValue(this.bCurrentSeason, out list);
            if (list == null)
            {
                return(null);
            }
            int num = (int)((this.bCurrentPage - 1) * 27) + nClickIndex;
            if (list.Count > num)
            {
                result = list[num];
            }
        }
        return(result);
    }
Beispiel #9
0
        public void ShowInfo(SolSlotData cSlotData)
        {
            this.SetEmpty();
            NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(cSlotData.i32KindInfo);

            BATTLESKILL_BASE mythBattleSkill = charKindInfo.GetMythBattleSkill();

            if (mythBattleSkill == null)
            {
                return;
            }
            this.m_i32MythSkillUnique = mythBattleSkill.m_nSkillUnique;
            if (cSlotData.bSolGrade >= 10)
            {
                this.m_btMythSkill.Visible = true;
            }
            else
            {
                this.m_btMythSkill_Lock.Visible = true;
                this.m_dtLock.Visible           = true;
            }
            this.m_dtMythSkillIcon.Visible = true;
            this.m_dtMythBox.Visible       = true;
            this.m_dtMythSkillBox.Visible  = true;
            this.m_lbMythSkillName.Visible = true;
            this.m_lbMythSkill.Visible     = true;
            UIBaseInfoLoader battleSkillIconTexture = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillIconTexture(mythBattleSkill.m_nSkillUnique);

            this.m_dtMythSkillIcon.SetTexture(battleSkillIconTexture);
            string empty = string.Empty;

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1293"),
                "skillname",
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(mythBattleSkill.m_strTextKey)
            });

            this.m_lbMythSkillName.Text = empty;
        }
        private void OnSelectSolPortrait(IUIObject obj)
        {
            if (obj == null || obj.Data == null)
            {
                return;
            }
            NrCharKindInfo nrCharKindInfo = (NrCharKindInfo)obj.Data;

            if (nrCharKindInfo == null)
            {
                return;
            }
            SOL_GUIDE solGuild = NrTSingleton <NrTableSolGuideManager> .Instance.GetSolGuild(nrCharKindInfo.GetCharKind());

            if (solGuild == null)
            {
                return;
            }
            SolSlotData solSlotData = new SolSlotData(nrCharKindInfo.GetName(), solGuild.m_i32CharKind, (byte)solGuild.m_iSolGrade, solGuild.m_bFlagSet, solGuild.m_bFlagSetCount - 1, solGuild.m_bSeason, solGuild.m_i32SkillUnique, solGuild.m_i32SkillText);

            if (solSlotData == null || solSlotData.i32KindInfo == 0)
            {
                return;
            }
            if (NrTSingleton <FormsManager> .Instance.IsShow(G_ID.SOLDETAIL_DLG))
            {
                return;
            }
            SolDetail_Info_Dlg solDetail_Info_Dlg = (SolDetail_Info_Dlg)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SOLDETAIL_DLG);

            if (!solDetail_Info_Dlg.Visible)
            {
                solDetail_Info_Dlg.Show();
            }
            solDetail_Info_Dlg.SetSolKind(solSlotData);
        }
Beispiel #11
0
 private int CompareSolName(SolSlotData a, SolSlotData b)
 {
     return(a.strSolName.CompareTo(b.strSolName));
 }
Beispiel #12
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);
    }