コード例 #1
0
        private void UpdateRankInfo(ref SCPKG_UPDRANKINFO_NTF newData)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo != null)
            {
                masterRoleInfo.m_rankGrade = newData.bCurGrade;
                masterRoleInfo.m_rankScore = newData.stRankInfo.dwScore;
                masterRoleInfo.m_rankClass = newData.dwCurClass;
                masterRoleInfo.m_rankSeasonHighestGrade  = newData.stRankInfo.bMaxSeasonGrade;
                masterRoleInfo.m_rankSeasonHighestClass  = newData.stRankInfo.dwMaxSeasonClass;
                masterRoleInfo.m_rankHistoryHighestGrade = newData.bMaxGradeOfRank;
                masterRoleInfo.m_rankHistoryHighestClass = newData.stRankInfo.dwTopClassOfRank;
                masterRoleInfo.m_rankCurSeasonStartTime  = (ulong)newData.stRankInfo.dwSeasonStartTime;
                masterRoleInfo.m_WangZheCnt = newData.dwWangZheCnt;
            }
            this.currentRankDetail = newData.stRankInfo;
            bool          flag = this.currentRankDetail.bState == 2 && this.currentRankDetail.bGetReward == 0;
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CLadderSystem.FORM_LADDER_ENTRY);

            if (form)
            {
                CLadderView.InitLadderEntry(form, 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);
                }
            }
            CLobbySystem.ShowWangZheCnt();
        }
コード例 #2
0
        private void UpdateRankInfo(ref SCPKG_UPDRANKINFO_NTF newData)
        {
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo != null)
            {
                masterRoleInfo.m_gradeOfRank        = newData.bCurGrade;
                masterRoleInfo.m_HighestGradeOfRank = newData.stRankInfo.bMaxSeasonGrade;
            }
            this.currentRankDetail = newData.stRankInfo;
            bool          flag = (this.currentRankDetail.bState == 2) && (this.currentRankDetail.bGetReward == 0);
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(FORM_LADDER_ENTRY);

            if (form != null)
            {
                CLadderView.InitLadderEntry(form, ref this.currentRankDetail, this.IsQualified());
                if (flag)
                {
                    CLadderView.InitRewardForm(Singleton <CUIManager> .GetInstance().OpenForm(FORM_LADDER_REWARD, false, true), ref this.currentRankDetail);
                }
            }
        }
コード例 #3
0
        public static void ReceiveRankInfo(CSPkg msg)
        {
            SCPKG_UPDRANKINFO_NTF stUpdateRankInfo = msg.stPkgData.stUpdateRankInfo;

            Singleton <CLadderSystem> .GetInstance().UpdateRankInfo(ref stUpdateRankInfo);
        }