Ejemplo n.º 1
0
        private void OpenLadderEntry()
        {
            bool flag = ((this.currentRankDetail != null) && (this.currentRankDetail.bState == 2)) && (this.currentRankDetail.bGetReward == 0);

            if (!this.CanOpenLadderEntry())
            {
                if (flag)
                {
                    CLadderView.InitRewardForm(Singleton <CUIManager> .GetInstance().OpenForm(FORM_LADDER_REWARD, false, true), ref this.currentRankDetail);
                }
            }
            else
            {
                CUIFormScript form = Singleton <CUIManager> .GetInstance().OpenForm(FORM_LADDER_ENTRY, false, true);

                if (form != null)
                {
                    CLadderView.InitLadderEntry(form, ref this.currentRankDetail, this.IsQualified());
                    CLadderView.SetMostRecentGameData(form, ref this.currentRankDetail, this.currentSeasonGames);
                    if (flag)
                    {
                        CLadderView.InitRewardForm(Singleton <CUIManager> .GetInstance().OpenForm(FORM_LADDER_REWARD, false, true), ref this.currentRankDetail);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void OpenLadderEntry()
        {
            bool flag = ((this.currentRankDetail != null) && (this.currentRankDetail.bState == 2)) && (this.currentRankDetail.bGetReward == 0);

            if (!this.CanOpenLadderEntry())
            {
                if (flag)
                {
                    CLadderView.InitRewardForm(Singleton <CUIManager> .GetInstance().OpenForm(FORM_LADDER_REWARD, false, true), ref this.currentRankDetail);
                }
            }
            else
            {
                CUIFormScript form = Singleton <CUIManager> .GetInstance().OpenForm(FORM_LADDER_ENTRY, false, true);

                if (form != null)
                {
                    CLadderView.InitLadderEntry(form, ref this.currentRankDetail, this.IsQualified());
                    CLadderView.SetMostRecentGameData(form, ref this.currentRankDetail, this.currentSeasonGames);
                    if (flag)
                    {
                        CLadderView.InitRewardForm(Singleton <CUIManager> .GetInstance().OpenForm(FORM_LADDER_REWARD, false, true), ref this.currentRankDetail);
                    }
                    if (this.IsShowLadderKingForm())
                    {
                        CLadderView.InitKingForm(Singleton <CUIManager> .GetInstance().OpenForm(FORM_LADDER_KING, false, true), ref this.currentRankDetail);
                        PlayerPrefs.SetInt("Ladder_LatestShowKingFormTimePrefKey", CRoleInfo.GetCurrentUTCTime());
                    }
                }
            }
        }
Ejemplo n.º 3
0
        private void AddRecentGameData(COMDT_RANK_CURSEASON_FIGHT_RECORD gameData)
        {
            if (this.currentSeasonGames == null)
            {
                this.currentSeasonGames = new List <COMDT_RANK_CURSEASON_FIGHT_RECORD>();
            }
            this.currentSeasonGames.Add(gameData);
            this.currentSeasonGames.Sort(new Comparison <COMDT_RANK_CURSEASON_FIGHT_RECORD>(CLadderSystem.ComparisonGameData));
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(FORM_LADDER_ENTRY);

            if (form != null)
            {
                CLadderView.SetMostRecentGameData(form, ref this.currentRankDetail, this.currentSeasonGames);
            }
            CUIFormScript script2 = Singleton <CUIManager> .GetInstance().GetForm(FORM_LADDER_RECENT);

            if (script2 != null)
            {
                CLadderView.InitLadderRecent(script2, this.currentSeasonGames);
            }
        }