Beispiel #1
0
 public void Init_Timer()
 {
     if (this.ChannelType == EChatChannel.Lobby)
     {
         ResAcntExpInfo dataByKey = GameDataMgr.acntExpDatabin.GetDataByKey(Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo().PvpLevel);
         this.cd_time = dataByKey.dwChatCD;
         if (this.cd_time > 0u)
         {
             this.cd_time += CChatChannel.clt_pendding_time;
         }
         this.cd_time /= 1000u;
     }
 }
Beispiel #2
0
        public void Init_Timer()
        {
            if (this.ChannelType == EChatChannel.Lobby)
            {
                ResAcntExpInfo dataByKey = GameDataMgr.acntExpDatabin.GetDataByKey(Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().PvpLevel);
                this.cd_time = dataByKey.dwChatCD;
                Singleton <CTimerManager> .GetInstance().RemoveTimer(this.inputCDTimer);

                if (this.cd_time > 0)
                {
                    this.cd_time     += clt_pendding_time;
                    this.inputCDTimer = Singleton <CTimerManager> .GetInstance().AddTimer((int)this.cd_time, -1, new CTimer.OnTimeUpHandler(this.On_InputCD_Done));

                    Singleton <CTimerManager> .GetInstance().PauseTimer(this.inputCDTimer);
                }
            }
        }
        public void ConvertServerDetailData(CSDT_ACNT_DETAIL_INFO detailInfo)
        {
            this.isMasterData = false;
            this.ResetData();
            this._doubleKillCount  = 0;
            this._trippleKillCount = 0;
            this._quataryKillCount = 0;
            this._pentaKillCount   = 0;
            this._holyShitCount    = 0;
            this._mvpCnt           = 0;
            this._loseMvpCount     = 0;
            if (detailInfo == null)
            {
                return;
            }
            this._playerName               = StringHelper.UTF8BytesToString(ref detailInfo.szAcntName);
            this.m_personSign              = StringHelper.UTF8BytesToString(ref detailInfo.szSignatureInfo);
            this.m_uuid                    = detailInfo.ullUid;
            this.m_iLogicWorldId           = detailInfo.iLogicWorldId;
            this.m_vipInfo                 = new SCPKG_GAME_VIP_NTF();
            this.m_vipInfo.stGameVipClient = detailInfo.stGameVip;
            this._playerHeadUrl            = Singleton <ApolloHelper> .GetInstance().ToSnsHeadUrl(ref detailInfo.szOpenUrl);

            this._playerLevel = detailInfo.dwLevel;
            ResAcntExpInfo dataByKey = GameDataMgr.acntExpDatabin.GetDataByKey(this._playerLevel);

            this._playerNeedExp           = dataByKey.dwNeedExp;
            this._playerExp               = detailInfo.dwExp;
            this.creditScore              = detailInfo.dwCreditValue;
            this.sumDelCreditValue        = detailInfo.iSumDelCreditValue * -1;
            this.mostDelCreditType        = detailInfo.dwMostDelCreditType;
            this._power                   = detailInfo.dwPower;
            this._pvpLevel                = detailInfo.dwPvpLevel;
            this._playerPvpExp            = detailInfo.dwPvpExp;
            this._gender                  = detailInfo.bGender;
            this._privilegeType           = detailInfo.bPrivilege;
            this._rankGrade               = detailInfo.bGradeOfRank;
            this._rankHistoryHighestGrade = detailInfo.bMaxGradeOfRank;
            this._rankClass               = detailInfo.dwCurClassOfRank;
            this._rankHistoryHighestClass = detailInfo.stRankInfo.dwTopClassOfRank;
            this.GuildName                = StringHelper.UTF8BytesToString(ref detailInfo.stGuildInfo.szGuildName);
            this.GuildState               = detailInfo.stGuildInfo.bGuildState;
            this.qqVipMask                = detailInfo.dwQQVIPMask;
            int num = 0;

            while ((long)num < (long)((ulong)detailInfo.stStatistic.stKVDetail.dwNum))
            {
                COMDT_STATISTIC_KEY_VALUE_INFO cOMDT_STATISTIC_KEY_VALUE_INFO = detailInfo.stStatistic.stKVDetail.astKVDetail[num];
                RES_STATISTIC_SETTLE_DATA_TYPE dwKey = cOMDT_STATISTIC_KEY_VALUE_INFO.dwKey;
                switch (dwKey)
                {
                case 13:
                    this._mvpCnt = (int)cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue;
                    break;

                case 14:
                    this._loseMvpCount = (int)cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue;
                    break;

                case 15:
                    this._holyShitCount = (int)cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue;
                    break;

                case 16:
                    this._doubleKillCount = (int)cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue;
                    break;

                case 17:
                    this._trippleKillCount = (int)cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue;
                    break;

                default:
                    if (dwKey != 27)
                    {
                        if (dwKey == 28)
                        {
                            this._pentaKillCount = (int)cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue;
                        }
                    }
                    else
                    {
                        this._quataryKillCount = (int)cOMDT_STATISTIC_KEY_VALUE_INFO.dwValue;
                    }
                    break;
                }
                num++;
            }
            this._5V5TotalCount           = (int)detailInfo.stStatistic.stFiveVsFiveInfo.dwTotalNum;
            this._5V5WinCount             = (int)detailInfo.stStatistic.stFiveVsFiveInfo.dwWinNum;
            this._3V3TotalCount           = (int)detailInfo.stStatistic.stThreeVsThreeInfo.dwTotalNum;
            this._3V3WinCount             = (int)detailInfo.stStatistic.stThreeVsThreeInfo.dwWinNum;
            this._2V2TotalCount           = (int)detailInfo.stStatistic.stTwoVsTwoInfo.dwTotalNum;
            this._2V2WinCount             = (int)detailInfo.stStatistic.stTwoVsTwoInfo.dwWinNum;
            this._1V1TotalCount           = (int)detailInfo.stStatistic.stOneVsOneInfo.dwTotalNum;
            this._1V1WinCount             = (int)detailInfo.stStatistic.stOneVsOneInfo.dwWinNum;
            this._guildTotalCount         = (int)detailInfo.stStatistic.stGuildMatch.dwTotalNum;
            this._guildWinCount           = (int)detailInfo.stStatistic.stGuildMatch.dwWinNum;
            this._vsAiTotalCount          = (int)detailInfo.stStatistic.stVsMachineInfo.dwTotalNum;
            this._vsAiWinCount            = (int)detailInfo.stStatistic.stVsMachineInfo.dwWinNum;
            this._rankTotalCount          = (int)detailInfo.stStatistic.stLadderInfo.dwTotalNum;
            this._rankWinCount            = (int)detailInfo.stStatistic.stLadderInfo.dwWinNum;
            this._entertainmentTotalCount = (int)detailInfo.stStatistic.stEntertainmentInfo.dwTotalNum;
            this._entertainmentWinCount   = (int)detailInfo.stStatistic.stEntertainmentInfo.dwWinNum;
            this._heroCnt  = (int)detailInfo.stMostUsedHero.dwTotalHeroNum;
            this._skinCnt  = (int)detailInfo.stMostUsedHero.dwTotalSkinNum;
            this._isOnLine = (detailInfo.bIsOnline != 0);
            if (this._mostUsedHeroList == null)
            {
                this._mostUsedHeroList = new ListView <COMDT_MOST_USED_HERO_INFO>();
            }
            else
            {
                this._mostUsedHeroList.Clear();
            }
            int num2 = (int)Mathf.Min(detailInfo.stMostUsedHero.dwHeroNum, (float)detailInfo.stMostUsedHero.astHeroInfoList.Length);

            for (int i = 0; i < num2; i++)
            {
                this._mostUsedHeroList.Add(detailInfo.stMostUsedHero.astHeroInfoList[i]);
            }
            this.SortMostUsedHeroList();
            if (detailInfo.stHonorInfo == null || detailInfo.stHonorInfo.bHonorCnt < 6)
            {
                Singleton <CRoleInfoManager> .get_instance().InsertHonorOnDuplicateUpdate(ref this._honorDic, 1, 0);

                Singleton <CRoleInfoManager> .get_instance().InsertHonorOnDuplicateUpdate(ref this._honorDic, 2, 0);

                Singleton <CRoleInfoManager> .get_instance().InsertHonorOnDuplicateUpdate(ref this._honorDic, 6, 0);

                Singleton <CRoleInfoManager> .get_instance().InsertHonorOnDuplicateUpdate(ref this._honorDic, 4, 0);

                Singleton <CRoleInfoManager> .get_instance().InsertHonorOnDuplicateUpdate(ref this._honorDic, 5, 0);

                Singleton <CRoleInfoManager> .get_instance().InsertHonorOnDuplicateUpdate(ref this._honorDic, 3, 0);
            }
            if (detailInfo.stHonorInfo != null)
            {
                for (int j = 0; j < (int)detailInfo.stHonorInfo.bHonorCnt; j++)
                {
                    COMDT_HONORINFO cOMDT_HONORINFO = detailInfo.stHonorInfo.astHonorInfo[j];
                    switch (cOMDT_HONORINFO.iHonorID)
                    {
                    case 1:
                    case 2:
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                        Singleton <CRoleInfoManager> .get_instance().InsertHonorOnDuplicateUpdate(ref this._honorDic, cOMDT_HONORINFO.iHonorID, cOMDT_HONORINFO.iHonorPoint);

                        break;
                    }
                }
                COMDT_HONORINFO cOMDT_HONORINFO2 = new COMDT_HONORINFO();
                if (this._honorDic.TryGetValue(detailInfo.stHonorInfo.iCurUseHonorID, ref cOMDT_HONORINFO2))
                {
                    if (cOMDT_HONORINFO2.iHonorLevel > 0)
                    {
                        this._selectedHonorId = detailInfo.stHonorInfo.iCurUseHonorID;
                    }
                    else
                    {
                        this._selectedHonorId = 0;
                    }
                }
            }
            this._geiLiDuiYou     = (int)detailInfo.stLikeNum.dwTeammateNum;
            this._keJingDuiShou   = (int)detailInfo.stLikeNum.dwOpponentNum;
            this._haveExtraCoin   = false;
            this._haveExtraExp    = false;
            this.pvpExtraDetail   = detailInfo.stStatistic.stMultiExtraDetail;
            this.pvpAbilityDetail = detailInfo.stStatistic.stRadarDetail;
            CAchieveInfo2 achieveInfo = CAchieveInfo2.GetAchieveInfo(detailInfo.iLogicWorldId, detailInfo.ullUid, false);

            achieveInfo.OnServerAchieveInfo(detailInfo.astShowAchievement, detailInfo.dwAchieveMentScore);
            this._trophyRewardInfoLevel = achieveInfo.LastDoneTrophyRewardInfo.Cfg.dwTrophyLvl;
            this._trophyRank            = achieveInfo.GetWorldRank();
            Array.Copy(achieveInfo.SelectedTrophies, this._selectedTrophies, achieveInfo.SelectedTrophies.Length);
            this._mentorInfo = Utility.DeepCopyByReflection <COMDT_ACNT_MASTER_INFO>(detailInfo.stAcntMasterInfo);
        }
Beispiel #4
0
        public void ConvertServerDetailData(CSDT_ACNT_DETAIL_INFO detailInfo)
        {
            this._doubleKillCount  = 0;
            this._trippleKillCount = 0;
            this._quataryKillCount = 0;
            this._pentaKillCount   = 0;
            this._holyShitCount    = 0;
            this._mvpCnt           = 0;
            this._loseMvpCount     = 0;
            if (detailInfo != null)
            {
                this._playerName = StringHelper.UTF8BytesToString(ref detailInfo.szAcntName);
                this.m_uuid      = detailInfo.ullUid;
                this.m_vipInfo   = new SCPKG_GAME_VIP_NTF();
                this.m_vipInfo.stGameVipClient = detailInfo.stGameVip;
                this._playerHeadUrl            = Singleton <ApolloHelper> .GetInstance().ToSnsHeadUrl(ref detailInfo.szOpenUrl);

                this._playerLevel = detailInfo.dwLevel;
                ResAcntExpInfo dataByKey = GameDataMgr.acntExpDatabin.GetDataByKey(this._playerLevel);
                this._playerNeedExp      = dataByKey.dwNeedExp;
                this._playerExp          = detailInfo.dwExp;
                this._power              = detailInfo.dwPower;
                this._pvpLevel           = detailInfo.dwPvpLevel;
                this._playerPvpExp       = detailInfo.dwPvpExp;
                this._gender             = (COM_SNSGENDER)detailInfo.bGender;
                this._privilegeType      = (COM_PRIVILEGE_TYPE)detailInfo.bPrivilege;
                this._gradeOfRank        = detailInfo.bGradeOfRank;
                this._highestGradeOfRank = detailInfo.bMaxGradeOfRank;
                this.GuildName           = StringHelper.UTF8BytesToString(ref detailInfo.stGuildInfo.szGuildName);
                this.GuildState          = (COM_PLAYER_GUILD_STATE)detailInfo.stGuildInfo.bGuildState;
                this.qqVipMask           = detailInfo.dwQQVIPMask;
                for (int i = 0; i < detailInfo.stStatistic.stKVDetail.dwNum; i++)
                {
                    COMDT_STATISTIC_KEY_VALUE_INFO comdt_statistic_key_value_info = detailInfo.stStatistic.stKVDetail.astKVDetail[i];
                    switch (((RES_STATISTIC_SETTLE_DATA_TYPE)comdt_statistic_key_value_info.dwKey))
                    {
                    case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_MVP_CNT:
                        this._mvpCnt = (int)comdt_statistic_key_value_info.dwValue;
                        break;

                    case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_LOSE_SOUL:
                        this._loseMvpCount = (int)comdt_statistic_key_value_info.dwValue;
                        break;

                    case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_GODLIKE_CNT:
                        this._holyShitCount = (int)comdt_statistic_key_value_info.dwValue;
                        break;

                    case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_DOUBLE_KILL_CNT:
                        this._doubleKillCount = (int)comdt_statistic_key_value_info.dwValue;
                        break;

                    case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_TRIPLE_KILL_CNT:
                        this._trippleKillCount = (int)comdt_statistic_key_value_info.dwValue;
                        break;

                    case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_QUATARY_KILL_CNT:
                        this._quataryKillCount = (int)comdt_statistic_key_value_info.dwValue;
                        break;

                    case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_PENTA_KILL_CNT:
                        this._pentaKillCount = (int)comdt_statistic_key_value_info.dwValue;
                        break;
                    }
                }
                this._5V5TotalCount           = (int)detailInfo.stStatistic.stFiveVsFiveInfo.dwTotalNum;
                this._5V5WinCount             = (int)detailInfo.stStatistic.stFiveVsFiveInfo.dwWinNum;
                this._3V3TotalCount           = (int)detailInfo.stStatistic.stThreeVsThreeInfo.dwTotalNum;
                this._3V3WinCount             = (int)detailInfo.stStatistic.stThreeVsThreeInfo.dwWinNum;
                this._2V2TotalCount           = (int)detailInfo.stStatistic.stTwoVsTwoInfo.dwTotalNum;
                this._2V2WinCount             = (int)detailInfo.stStatistic.stTwoVsTwoInfo.dwWinNum;
                this._1V1TotalCount           = (int)detailInfo.stStatistic.stOneVsOneInfo.dwTotalNum;
                this._1V1WinCount             = (int)detailInfo.stStatistic.stOneVsOneInfo.dwWinNum;
                this._vsAiTotalCount          = (int)detailInfo.stStatistic.stVsMachineInfo.dwTotalNum;
                this._vsAiWinCount            = (int)detailInfo.stStatistic.stVsMachineInfo.dwWinNum;
                this._rankTotalCount          = (int)detailInfo.stStatistic.stLadderInfo.dwTotalNum;
                this._rankWinCount            = (int)detailInfo.stStatistic.stLadderInfo.dwWinNum;
                this._entertainmentTotalCount = (int)detailInfo.stStatistic.stEntertainmentInfo.dwTotalNum;
                this._entertainmentWinCount   = (int)detailInfo.stStatistic.stEntertainmentInfo.dwWinNum;
                this._heroCnt  = (int)detailInfo.stMostUsedHero.dwTotalHeroNum;
                this._skinCnt  = (int)detailInfo.stMostUsedHero.dwTotalSkinNum;
                this._isOnLine = detailInfo.bIsOnline != 0;
                if (this._mostUsedHeroList == null)
                {
                    this._mostUsedHeroList = new ListView <COMDT_MOST_USED_HERO_INFO>();
                }
                else
                {
                    this._mostUsedHeroList.Clear();
                }
                int num2 = (int)Mathf.Min((float)detailInfo.stMostUsedHero.dwHeroNum, (float)detailInfo.stMostUsedHero.astHeroInfoList.Length);
                for (int j = 0; j < num2; j++)
                {
                    this._mostUsedHeroList.Add(detailInfo.stMostUsedHero.astHeroInfoList[j]);
                }
                this.SortMostUsedHeroList();
            }
        }
        private void On_Chat_PlayerLevel_Set()
        {
            ResAcntExpInfo dataByKey = GameDataMgr.acntExpDatabin.GetDataByKey(Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().PvpLevel);

            Singleton <CChatController> .GetInstance().model.channelMgr.GetChannel(EChatChannel.Lobby).InitChat_InputTimer((int)dataByKey.dwChatCD);
        }
Beispiel #6
0
        public void ConvertServerDetailData(CSDT_ACNT_DETAIL_INFO detailInfo)
        {
            this.ResetData();
            this._doubleKillCount  = 0;
            this._trippleKillCount = 0;
            this._quataryKillCount = 0;
            this._pentaKillCount   = 0;
            this._holyShitCount    = 0;
            this._mvpCnt           = 0;
            this._loseMvpCount     = 0;
            if (detailInfo != null)
            {
                this._playerName               = StringHelper.UTF8BytesToString(ref detailInfo.szAcntName);
                this.m_personSign              = StringHelper.UTF8BytesToString(ref detailInfo.szSignatureInfo);
                this.m_uuid                    = detailInfo.ullUid;
                this.m_iLogicWorldId           = detailInfo.iLogicWorldId;
                this.m_vipInfo                 = new SCPKG_GAME_VIP_NTF();
                this.m_vipInfo.stGameVipClient = detailInfo.stGameVip;
                this._playerHeadUrl            = Singleton <ApolloHelper> .GetInstance().ToSnsHeadUrl(ref detailInfo.szOpenUrl);

                this._playerLevel = detailInfo.dwLevel;
                ResAcntExpInfo dataByKey = GameDataMgr.acntExpDatabin.GetDataByKey(this._playerLevel);
                this._playerNeedExp           = dataByKey.dwNeedExp;
                this._playerExp               = detailInfo.dwExp;
                this.creditScore              = detailInfo.dwCreditValue;
                this._power                   = detailInfo.dwPower;
                this._pvpLevel                = detailInfo.dwPvpLevel;
                this._playerPvpExp            = detailInfo.dwPvpExp;
                this._gender                  = (COM_SNSGENDER)detailInfo.bGender;
                this._privilegeType           = (COM_PRIVILEGE_TYPE)detailInfo.bPrivilege;
                this._rankGrade               = detailInfo.bGradeOfRank;
                this._rankHistoryHighestGrade = detailInfo.bMaxGradeOfRank;
                this._rankClass               = detailInfo.dwCurClassOfRank;
                this._rankHistoryHighestClass = detailInfo.stRankInfo.dwTopClassOfRank;
                this.GuildName                = StringHelper.UTF8BytesToString(ref detailInfo.stGuildInfo.szGuildName);
                this.GuildState               = (COM_PLAYER_GUILD_STATE)detailInfo.stGuildInfo.bGuildState;
                this.qqVipMask                = detailInfo.dwQQVIPMask;
                for (int i = 0; i < detailInfo.stStatistic.stKVDetail.dwNum; i++)
                {
                    COMDT_STATISTIC_KEY_VALUE_INFO comdt_statistic_key_value_info = detailInfo.stStatistic.stKVDetail.astKVDetail[i];
                    switch (((RES_STATISTIC_SETTLE_DATA_TYPE)comdt_statistic_key_value_info.dwKey))
                    {
                    case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_MVP_CNT:
                        this._mvpCnt = (int)comdt_statistic_key_value_info.dwValue;
                        break;

                    case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_LOSE_SOUL:
                        this._loseMvpCount = (int)comdt_statistic_key_value_info.dwValue;
                        break;

                    case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_GODLIKE_CNT:
                        this._holyShitCount = (int)comdt_statistic_key_value_info.dwValue;
                        break;

                    case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_DOUBLE_KILL_CNT:
                        this._doubleKillCount = (int)comdt_statistic_key_value_info.dwValue;
                        break;

                    case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_TRIPLE_KILL_CNT:
                        this._trippleKillCount = (int)comdt_statistic_key_value_info.dwValue;
                        break;

                    case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_QUATARY_KILL_CNT:
                        this._quataryKillCount = (int)comdt_statistic_key_value_info.dwValue;
                        break;

                    case RES_STATISTIC_SETTLE_DATA_TYPE.RES_STATISTIC_SETTLE_DATA_TYPE_PENTA_KILL_CNT:
                        this._pentaKillCount = (int)comdt_statistic_key_value_info.dwValue;
                        break;
                    }
                }
                this._5V5TotalCount           = (int)detailInfo.stStatistic.stFiveVsFiveInfo.dwTotalNum;
                this._5V5WinCount             = (int)detailInfo.stStatistic.stFiveVsFiveInfo.dwWinNum;
                this._3V3TotalCount           = (int)detailInfo.stStatistic.stThreeVsThreeInfo.dwTotalNum;
                this._3V3WinCount             = (int)detailInfo.stStatistic.stThreeVsThreeInfo.dwWinNum;
                this._2V2TotalCount           = (int)detailInfo.stStatistic.stTwoVsTwoInfo.dwTotalNum;
                this._2V2WinCount             = (int)detailInfo.stStatistic.stTwoVsTwoInfo.dwWinNum;
                this._1V1TotalCount           = (int)detailInfo.stStatistic.stOneVsOneInfo.dwTotalNum;
                this._1V1WinCount             = (int)detailInfo.stStatistic.stOneVsOneInfo.dwWinNum;
                this._vsAiTotalCount          = (int)detailInfo.stStatistic.stVsMachineInfo.dwTotalNum;
                this._vsAiWinCount            = (int)detailInfo.stStatistic.stVsMachineInfo.dwWinNum;
                this._rankTotalCount          = (int)detailInfo.stStatistic.stLadderInfo.dwTotalNum;
                this._rankWinCount            = (int)detailInfo.stStatistic.stLadderInfo.dwWinNum;
                this._entertainmentTotalCount = (int)detailInfo.stStatistic.stEntertainmentInfo.dwTotalNum;
                this._entertainmentWinCount   = (int)detailInfo.stStatistic.stEntertainmentInfo.dwWinNum;
                this._heroCnt  = (int)detailInfo.stMostUsedHero.dwTotalHeroNum;
                this._skinCnt  = (int)detailInfo.stMostUsedHero.dwTotalSkinNum;
                this._isOnLine = detailInfo.bIsOnline != 0;
                if (this._mostUsedHeroList == null)
                {
                    this._mostUsedHeroList = new ListView <COMDT_MOST_USED_HERO_INFO>();
                }
                else
                {
                    this._mostUsedHeroList.Clear();
                }
                int num2 = (int)Mathf.Min((float)detailInfo.stMostUsedHero.dwHeroNum, (float)detailInfo.stMostUsedHero.astHeroInfoList.Length);
                for (int j = 0; j < num2; j++)
                {
                    this._mostUsedHeroList.Add(detailInfo.stMostUsedHero.astHeroInfoList[j]);
                }
                this.SortMostUsedHeroList();
                if ((detailInfo.stHonorInfo == null) || (detailInfo.stHonorInfo.bHonorCnt < 6))
                {
                    Singleton <CRoleInfoManager> .instance.InsertHonorOnDuplicateUpdate(ref this._honorDic, 1, 0);

                    Singleton <CRoleInfoManager> .instance.InsertHonorOnDuplicateUpdate(ref this._honorDic, 2, 0);

                    Singleton <CRoleInfoManager> .instance.InsertHonorOnDuplicateUpdate(ref this._honorDic, 6, 0);

                    Singleton <CRoleInfoManager> .instance.InsertHonorOnDuplicateUpdate(ref this._honorDic, 4, 0);

                    Singleton <CRoleInfoManager> .instance.InsertHonorOnDuplicateUpdate(ref this._honorDic, 5, 0);

                    Singleton <CRoleInfoManager> .instance.InsertHonorOnDuplicateUpdate(ref this._honorDic, 3, 0);
                }
                if (detailInfo.stHonorInfo != null)
                {
                    for (int k = 0; k < detailInfo.stHonorInfo.bHonorCnt; k++)
                    {
                        COMDT_HONORINFO comdt_honorinfo = detailInfo.stHonorInfo.astHonorInfo[k];
                        switch (comdt_honorinfo.iHonorID)
                        {
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                            Singleton <CRoleInfoManager> .instance.InsertHonorOnDuplicateUpdate(ref this._honorDic, comdt_honorinfo.iHonorID, comdt_honorinfo.iHonorPoint);

                            break;
                        }
                    }
                    COMDT_HONORINFO comdt_honorinfo2 = new COMDT_HONORINFO();
                    if (this._honorDic.TryGetValue(detailInfo.stHonorInfo.iCurUseHonorID, out comdt_honorinfo2))
                    {
                        if (comdt_honorinfo2.iHonorLevel > 0)
                        {
                            this._selectedHonorId = detailInfo.stHonorInfo.iCurUseHonorID;
                        }
                        else
                        {
                            this._selectedHonorId = 0;
                        }
                    }
                }
                this._geiLiDuiYou   = (int)detailInfo.stLikeNum.dwTeammateNum;
                this._keJingDuiShou = (int)detailInfo.stLikeNum.dwOpponentNum;
                this._haveExtraCoin = false;
                this._haveExtraExp  = false;
            }
        }
Beispiel #7
0
		protected override uint calcMaxExp()
		{
			ResAcntExpInfo dataByKey = GameDataMgr.acntExpDatabin.GetDataByKey((uint)this.m_level);
			return dataByKey.dwNeedExp;
		}
Beispiel #8
0
        public static void ShowPlayerLevelUp(CUIFormScript form, int oldLvl, int newLvl)
        {
            if (form != null)
            {
                GameObject gameObject = form.transform.Find("PlayerLvlUp").gameObject;
                Text       component  = gameObject.transform.Find("bg/TxtPlayerLvl").gameObject.GetComponent <Text>();
                component.text = newLvl.ToString();
                Text component2 = gameObject.transform.Find("bg/TxtPlayerBeforeLvl").gameObject.GetComponent <Text>();
                component2.text = oldLvl.ToString();
                ResAcntExpInfo dataByKey = GameDataMgr.acntExpDatabin.GetDataByKey((uint)oldLvl);
                DebugHelper.Assert(dataByKey != null, "Can't find acnt exp config -- level {0}", new object[]
                {
                    oldLvl
                });
                ResAcntExpInfo dataByKey2 = GameDataMgr.acntExpDatabin.GetDataByKey((uint)newLvl);
                DebugHelper.Assert(dataByKey2 != null, "Can't find acnt exp config -- level {0}", new object[]
                {
                    newLvl
                });
                Transform transform         = gameObject.transform.Find("Panel/groupPanel/symbolPosPanel");
                int       symbolPosOpenCnt  = CSymbolInfo.GetSymbolPosOpenCnt(oldLvl);
                int       symbolPosOpenCnt2 = CSymbolInfo.GetSymbolPosOpenCnt(newLvl);
                bool      hasBuy            = false;
                CRoleInfo master            = Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo();

                if (master != null && symbolPosOpenCnt < symbolPosOpenCnt2)
                {
                    GameDataMgr.symbolPosDatabin.Accept(delegate(ResSymbolPos rule)
                    {
                        if (rule != null && (int)rule.wOpenLevel == newLvl)
                        {
                            hasBuy = master.m_symbolInfo.IsGridPosHasBuy((int)rule.bSymbolPos);
                        }
                    });
                }
                transform.gameObject.CustomSetActive(!hasBuy && symbolPosOpenCnt2 > symbolPosOpenCnt);
                if (!hasBuy && symbolPosOpenCnt2 > symbolPosOpenCnt)
                {
                    Text component3 = transform.Find("curCntText").gameObject.GetComponent <Text>();
                    component3.text = symbolPosOpenCnt.ToString();
                    Text component4 = transform.Find("levelUpCntText").gameObject.GetComponent <Text>();
                    component4.text = symbolPosOpenCnt2.ToString();
                }
                Transform transform2      = gameObject.transform.Find("Panel/groupPanel/symbolLevelPanel");
                int       symbolLvlLimit  = CSymbolInfo.GetSymbolLvlLimit(oldLvl);
                int       symbolLvlLimit2 = CSymbolInfo.GetSymbolLvlLimit(newLvl);
                transform2.gameObject.CustomSetActive(symbolLvlLimit2 > symbolLvlLimit);
                if (symbolLvlLimit2 > symbolLvlLimit)
                {
                    Text component5 = transform2.Find("curCntText").gameObject.GetComponent <Text>();
                    Text component6 = transform2.Find("levelUpCntText").gameObject.GetComponent <Text>();
                    component5.text = symbolLvlLimit.ToString();
                    component6.text = symbolLvlLimit2.ToString();
                }
                Transform        transform3 = gameObject.transform.Find("Panel/groupPanel/symbolPageCntPanel");
                ResHeroSymbolLvl dataByKey3 = GameDataMgr.heroSymbolLvlDatabin.GetDataByKey((long)newLvl);
                if (dataByKey3 != null)
                {
                    transform3.gameObject.CustomSetActive(dataByKey3.bPresentSymbolPage > 0);
                    CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

                    if (masterRoleInfo == null)
                    {
                        return;
                    }
                    if (dataByKey3.bPresentSymbolPage > 0 && masterRoleInfo != null)
                    {
                        Text component7 = transform3.Find("curCntText").gameObject.GetComponent <Text>();
                        Text component8 = transform3.Find("levelUpCntText").gameObject.GetComponent <Text>();
                        component7.text = (masterRoleInfo.m_symbolInfo.m_pageCount - 1).ToString();
                        component8.text = masterRoleInfo.m_symbolInfo.m_pageCount.ToString();
                    }
                }
            }
        }