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);
                    }
                    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.º 2
0
        private void OpenLadderEntry()
        {
            CUICommonSystem.ResetLobbyFormFadeRecover();
            bool flag = this.currentRankDetail != null && this.currentRankDetail.bState == 2 && this.currentRankDetail.bGetReward == 0;

            if (!this.CanOpenLadderEntry())
            {
                if (flag)
                {
                    CUIFormScript form = Singleton <CUIManager> .GetInstance().OpenForm(CLadderSystem.FORM_LADDER_REWARD, false, true);

                    CLadderView.InitRewardForm(form, ref this.currentRankDetail);
                }
                return;
            }
            CUIFormScript cUIFormScript = Singleton <CUIManager> .GetInstance().OpenForm(CLadderSystem.FORM_LADDER_ENTRY, false, true);

            if (cUIFormScript)
            {
                CLadderView.InitLadderEntry(cUIFormScript, ref this.currentRankDetail, this.IsQualified());
                if (flag)
                {
                    CUIFormScript form2 = Singleton <CUIManager> .GetInstance().OpenForm(CLadderSystem.FORM_LADDER_REWARD, false, true);

                    CLadderView.InitRewardForm(form2, ref this.currentRankDetail);
                }
                if (this.IsShowLadderKingForm())
                {
                    CUIFormScript form3 = Singleton <CUIManager> .GetInstance().OpenForm(CLadderSystem.FORM_LADDER_KING, false, true);

                    CLadderView.InitKingForm(form3, ref this.currentRankDetail);
                    PlayerPrefs.SetInt("Ladder_LatestShowKingFormTimePrefKey", CRoleInfo.GetCurrentUTCTime());
                }
                bool show = this.IsShowButtonIn5();
                CLadderView.ShowRankButtonIn5(cUIFormScript, show);
            }
        }