Пример #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();
        }
        public static void OnReceiveNewbitSyn(CSPkg msg)
        {
            Singleton <CUIManager> .GetInstance().CloseSendMsgAlert();

            SCPKG_NTF_NEWIEBITSYN stNewieBitSyn  = msg.stPkgData.stNewieBitSyn;
            CRoleInfo             masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            masterRoleInfo.SetGuidedStateSet((int)stNewieBitSyn.dwBitType, true);
            if (stNewieBitSyn.dwBitType == 22u || stNewieBitSyn.dwBitType == 23u || stNewieBitSyn.dwBitType == 24u || stNewieBitSyn.dwBitType == 25u)
            {
                CLobbySystem.RefreshDianQuanPayButton(true);
                Singleton <CPaySystem> .GetInstance().AutoOpenRewardPanel(true);
            }
        }