private COMDT_RANKING_LIST_ITEM_EXTRA_PLAYER GetRankItemDetailInfo(enUnionRankType rankType, int listIndex)
        {
            CSDT_RANKING_LIST_SUCC listInfo = this.m_UnionRankInfo[(int)this.m_CurSelRankType].listInfo;

            if (listInfo == null || listIndex >= listInfo.astItemDetail.Length || (long)listIndex >= (long)((ulong)listInfo.dwItemNum))
            {
                return(new COMDT_RANKING_LIST_ITEM_EXTRA_PLAYER());
            }
            switch (rankType)
            {
            case enUnionRankType.enRankMatchType_WinCntCoinCoinMatchLow:
                return(listInfo.astItemDetail[listIndex].stExtraInfo.stDetailInfo.get_stLowCoinWin());

            case enUnionRankType.enRankMatchType_WinCntCoinMatchHigh:
                return(listInfo.astItemDetail[listIndex].stExtraInfo.stDetailInfo.get_stHighCoinWin());

            case enUnionRankType.enRankMatchType_WinCntDiamondMatchLow:
                return(listInfo.astItemDetail[listIndex].stExtraInfo.stDetailInfo.get_stLowDiamondWin());

            case enUnionRankType.enRankMatchType_WinCntDiamondMatchHigh:
                return(listInfo.astItemDetail[listIndex].stExtraInfo.stDetailInfo.get_stHighDiamondWin());

            default:
                return(new COMDT_RANKING_LIST_ITEM_EXTRA_PLAYER());
            }
        }
        private void RefreshWinCntRankList()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CUnionBattleRankSystem.UNION_RANK_PATH);

            if (form == null)
            {
                return;
            }
            GameObject             widget   = form.GetWidget(0);
            CSDT_RANKING_LIST_SUCC listInfo = this.m_UnionRankInfo[(int)this.m_CurSelRankType].listInfo;
            Transform transform             = widget.transform.FindChild("RankingList");
            Transform transform2            = widget.transform.FindChild("NoRankTxt");

            if (listInfo == null || listInfo.dwItemNum == 0u)
            {
                transform.gameObject.CustomSetActive(false);
                transform2.gameObject.CustomSetActive(true);
                return;
            }
            transform.gameObject.CustomSetActive(true);
            transform2.gameObject.CustomSetActive(false);
            int           dwItemNum = (int)listInfo.dwItemNum;
            CUIListScript component = transform.GetComponent <CUIListScript>();

            component.SetElementAmount(dwItemNum);
            component.MoveElementInScrollArea(0, true);
            for (int i = 0; i < dwItemNum; i++)
            {
                if (component.GetElemenet(i) != null && component.IsElementInScrollArea(i))
                {
                    this.RefreshOneWinCntElement(component.GetElemenet(i).gameObject, i);
                }
            }
        }
        private void OnGetRankList(SCPKG_GET_RANKING_LIST_RSP rankList)
        {
            enUnionRankType rankType = ConvertSeverToLocalRankType((COM_APOLLO_TRANK_SCORE_TYPE)rankList.stRankingListDetail.stOfSucc.bNumberType);

            if (rankType != enUnionRankType.enRankType_None)
            {
                this.m_UnionRankInfo[(int)rankType].lastRetrieveTime = (uint)CRoleInfo.GetCurrentUTCTime();
                this.m_UnionRankInfo[(int)rankType].listInfo         = rankList.stRankingListDetail.stOfSucc;
                CSDT_RANKING_LIST_SUCC listInfo = this.m_UnionRankInfo[(int)rankType].listInfo;
                CRoleInfo masterRoleInfo        = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

                if (masterRoleInfo != null)
                {
                    this.m_UnionRankInfo[(int)rankType].selfIndex = -1;
                    for (int i = 0; i < listInfo.dwItemNum; i++)
                    {
                        COMDT_RANKING_LIST_ITEM_EXTRA_PLAYER rankItemDetailInfo = this.GetRankItemDetailInfo(rankType, i);
                        if (masterRoleInfo.playerUllUID == rankItemDetailInfo.ullUid)
                        {
                            this.m_UnionRankInfo[(int)rankType].selfIndex = i;
                        }
                    }
                    this.RefreshWinCntRankList();
                    this.RefreshAcntInfo();
                }
            }
        }
        private void OnGetRankList(SCPKG_GET_RANKING_LIST_RSP rankList)
        {
            enUnionRankType enUnionRankType = CUnionBattleRankSystem.ConvertSeverToLocalRankType(rankList.stRankingListDetail.get_stOfSucc().bNumberType);

            if (enUnionRankType == enUnionRankType.enRankType_None)
            {
                return;
            }
            this.m_UnionRankInfo[(int)enUnionRankType].lastRetrieveTime = (uint)CRoleInfo.GetCurrentUTCTime();
            this.m_UnionRankInfo[(int)enUnionRankType].listInfo         = rankList.stRankingListDetail.get_stOfSucc();
            CSDT_RANKING_LIST_SUCC listInfo = this.m_UnionRankInfo[(int)enUnionRankType].listInfo;
            CRoleInfo masterRoleInfo        = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            if (masterRoleInfo == null)
            {
                return;
            }
            this.m_UnionRankInfo[(int)enUnionRankType].selfIndex = -1;
            int num = 0;

            while ((long)num < (long)((ulong)listInfo.dwItemNum))
            {
                COMDT_RANKING_LIST_ITEM_EXTRA_PLAYER rankItemDetailInfo = this.GetRankItemDetailInfo(enUnionRankType, num);
                if (masterRoleInfo.playerUllUID == rankItemDetailInfo.ullUid)
                {
                    this.m_UnionRankInfo[(int)enUnionRankType].selfIndex = num;
                }
                num++;
            }
            this.RefreshWinCntRankList();
            this.RefreshAcntInfo();
        }
Beispiel #5
0
        private void OnUpdateRankingAllElement(GameObject go, int index)
        {
            CSDT_RANKING_LIST_SUCC rankList = Singleton <RankingSystem> .instance.GetRankList(RankingSystem.RankingType.Ladder);

            if (rankList != null)
            {
                string     serverUrl  = string.Empty;
                GameObject headIcon   = null;
                GameObject gameObject = null;
                GameObject obj4       = null;
                headIcon   = go.transform.Find("HeadIcon").gameObject;
                gameObject = go.transform.Find("HeadbgNo1").gameObject;
                obj4       = go.transform.Find("123No").gameObject;
                serverUrl  = Singleton <ApolloHelper> .GetInstance().ToSnsHeadUrl(ref rankList.astItemDetail[index].stExtraInfo.stDetailInfo.stLadderPoint.szHeadUrl);

                gameObject.CustomSetActive(index == 0);
                RankingSystem.SetUrlHeadIcon(headIcon, serverUrl);
                obj4.transform.GetChild(0).gameObject.CustomSetActive(0 == index);
                obj4.transform.GetChild(1).gameObject.CustomSetActive(1 == index);
                obj4.transform.GetChild(2).gameObject.CustomSetActive(2 == index);
                int   dwHeadIconId = (int)rankList.astItemDetail[index].stExtraInfo.stDetailInfo.stLadderPoint.stGameVip.dwHeadIconId;
                Image component    = go.transform.Find("NobeImag").GetComponent <Image>();
                if (component != null)
                {
                    MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(component, dwHeadIconId);
                }
                GameObject qQVipIcon = go.transform.Find("QQVipIcon").gameObject;
                this.SetQQVip(qQVipIcon, false, (int)rankList.astItemDetail[index].stExtraInfo.stDetailInfo.stLadderPoint.dwVipLevel);
            }
        }
        private CSDT_RANKING_LIST_ITEM_INFO GetActRankInfo(enUnionRankType rankType)
        {
            CSDT_RANKING_LIST_SUCC listInfo = this.m_UnionRankInfo[(int)this.m_CurSelRankType].listInfo;
            int selfIndex = this.m_UnionRankInfo[(int)this.m_CurSelRankType].selfIndex;

            if (listInfo == null || selfIndex < 0 || selfIndex >= listInfo.astItemDetail.Length || (long)selfIndex >= (long)((ulong)listInfo.dwItemNum))
            {
                return(new CSDT_RANKING_LIST_ITEM_INFO());
            }
            return(listInfo.astItemDetail[selfIndex]);
        }
        private CSDT_RANKING_LIST_ITEM_INFO GetActRankInfo(enUnionRankType rankType)
        {
            CSDT_RANKING_LIST_SUCC listInfo = this.m_UnionRankInfo[(int)this.m_CurSelRankType].listInfo;
            int selfIndex = this.m_UnionRankInfo[(int)this.m_CurSelRankType].selfIndex;

            if (((listInfo != null) && (selfIndex >= 0)) && ((selfIndex < listInfo.astItemDetail.Length) && (selfIndex < listInfo.dwItemNum)))
            {
                return(listInfo.astItemDetail[selfIndex]);
            }
            return(new CSDT_RANKING_LIST_ITEM_INFO());
        }
Beispiel #8
0
        private void RankingListChange(RankingSystem.RankingType rankType)
        {
            if (rankType == RankingSystem.RankingType.Achievement)
            {
                CSDT_RANKING_LIST_SUCC rankList = Singleton <RankingSystem> .GetInstance().GetRankList(RankingSystem.RankingType.Achievement);

                if (rankList != null)
                {
                    int num = 0;
                    while ((long)num < (long)((ulong)rankList.dwItemNum))
                    {
                        CAchieveInfo2.AddWorldRank(rankList.astItemDetail[num].stExtraInfo.stDetailInfo.stAchievement.iLogicWorldId, rankList.astItemDetail[num].stExtraInfo.stDetailInfo.stAchievement.ullUid, (uint)(rankList.iStart + num));
                        num++;
                    }
                }
            }
        }
        private COMDT_RANKING_LIST_ITEM_EXTRA_PLAYER GetRankItemDetailInfo(enUnionRankType rankType, int listIndex)
        {
            CSDT_RANKING_LIST_SUCC listInfo = this.m_UnionRankInfo[(int)this.m_CurSelRankType].listInfo;

            if (((listInfo != null) && (listIndex < listInfo.astItemDetail.Length)) && (listIndex < listInfo.dwItemNum))
            {
                switch (rankType)
                {
                case enUnionRankType.enRankMatchType_WinCntCoinCoinMatchLow:
                    return(listInfo.astItemDetail[listIndex].stExtraInfo.stDetailInfo.stLowCoinWin);

                case enUnionRankType.enRankMatchType_WinCntCoinMatchHigh:
                    return(listInfo.astItemDetail[listIndex].stExtraInfo.stDetailInfo.stHighCoinWin);

                case enUnionRankType.enRankMatchType_WinCntDiamondMatchLow:
                    return(listInfo.astItemDetail[listIndex].stExtraInfo.stDetailInfo.stLowDiamondWin);

                case enUnionRankType.enRankMatchType_WinCntDiamondMatchHigh:
                    return(listInfo.astItemDetail[listIndex].stExtraInfo.stDetailInfo.stHighDiamondWin);
                }
            }
            return(new COMDT_RANKING_LIST_ITEM_EXTRA_PLAYER());
        }
        private void RefreshOneWinCntElement(GameObject element, int index)
        {
            CSDT_RANKING_LIST_SUCC listInfo = this.m_UnionRankInfo[(int)this.m_CurSelRankType].listInfo;

            if (element != null && listInfo != null && index < listInfo.astItemDetail.Length && (long)index < (long)((ulong)listInfo.dwItemNum))
            {
                RankingItemHelper component = element.GetComponent <RankingItemHelper>();
                string            text      = string.Empty;
                uint dwRankScore            = listInfo.astItemDetail[index].dwRankScore;
                COMDT_RANKING_LIST_ITEM_EXTRA_PLAYER rankItemDetailInfo = this.GetRankItemDetailInfo(this.m_CurSelRankType, index);
                text = StringHelper.UTF8BytesToString(ref rankItemDetailInfo.szPlayerName);
                uint   dwPvpLevel = rankItemDetailInfo.dwPvpLevel;
                string serverUrl  = Singleton <ApolloHelper> .GetInstance().ToSnsHeadUrl(ref rankItemDetailInfo.szHeadUrl);

                uint dwCurLevel               = rankItemDetailInfo.stGameVip.dwCurLevel;
                uint dwHeadIconId             = rankItemDetailInfo.stGameVip.dwHeadIconId;
                COM_PRIVILEGE_TYPE bPrivilege = rankItemDetailInfo.bPrivilege;
                uint dwVipLevel               = rankItemDetailInfo.dwVipLevel;
                MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.WxIcon, bPrivilege, 1, true, false);

                MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.QqIcon, bPrivilege, 2, true, false);

                MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.GuestIcon, bPrivilege, 5, true, false);

                CUnionBattleRankSystem.SetGameObjChildText(element, "NameGroup/PlayerName", text);
                CUnionBattleRankSystem.SetGameObjChildText(element, "PlayerLv", string.Format("Lv.{0}", Math.Max(1u, dwPvpLevel)));
                element.transform.FindChild("Value").gameObject.CustomSetActive(true);
                CUnionBattleRankSystem.SetGameObjChildText(element, "Value", dwRankScore.ToString(CultureInfo.get_InvariantCulture()));
                uint rankNumber = (uint)(index + 1);
                CUnionBattleRankSystem.RankNobSet(rankNumber, component);
                if (!CSysDynamicBlock.bSocialBlocked)
                {
                    if (rankItemDetailInfo.ullUid == Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().playerUllUID)
                    {
                        MonoSingleton <NobeSys> .GetInstance().SetMyQQVipHead(component.QqVip.GetComponent <Image>());

                        MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component.VipIcon.GetComponent <Image>(), (int)Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo().GetNobeInfo().stGameVipClient.dwCurLevel, false);

                        MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(component.HeadIconFrame.GetComponent <Image>(), (int)Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo().GetNobeInfo().stGameVipClient.dwHeadIconId);

                        MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.WxIcon, Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo().m_privilegeType, 1, true, false);

                        MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.QqIcon, Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo().m_privilegeType, 2, true, false);

                        MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.GuestIcon, Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo().m_privilegeType, 5, true, false);

                        RankingView.SetHostUrlHeadIcon(component.HeadIcon);
                    }
                    else
                    {
                        MonoSingleton <NobeSys> .GetInstance().SetOtherQQVipHead(component.QqVip.GetComponent <Image>(), (int)dwVipLevel);

                        MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component.VipIcon.GetComponent <Image>(), (int)dwCurLevel, false);

                        MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(component.HeadIconFrame.GetComponent <Image>(), (int)dwHeadIconId);

                        MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.WxIcon, bPrivilege, 1, true, false);

                        MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.QqIcon, bPrivilege, 2, true, false);

                        MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.GuestIcon, bPrivilege, 5, true, false);

                        RankingView.SetUrlHeadIcon(component.HeadIcon, serverUrl);
                    }
                }
            }
        }
Beispiel #11
0
        public static void UpdateOneGodElement(GameObject objElement, int viewIndex, CSDT_RANKING_LIST_SUCC curRankingList)
        {
            if ((curRankingList != null) && (objElement != null))
            {
                RankingItemHelper component = objElement.GetComponent <RankingItemHelper>();
                if (component != null)
                {
                    CSDT_RANKING_LIST_ITEM_INFO csdt_ranking_list_item_info = curRankingList.astItemDetail[viewIndex];
                    if (csdt_ranking_list_item_info != null)
                    {
                        string             text          = string.Empty;
                        uint               dwPvpLevel    = 1;
                        string             serverUrl     = null;
                        ulong              ullUid        = 0L;
                        uint               logicWorldId  = 0;
                        uint               dwCurLevel    = 0;
                        uint               dwHeadIconId  = 0;
                        uint               dwVipLevel    = 0;
                        COM_PRIVILEGE_TYPE privilegeType = COM_PRIVILEGE_TYPE.COM_PRIVILEGE_TYPE_NONE;
                        COMDT_RANKING_LIST_ITEM_EXTRA_PLAYER stAcntInfo = csdt_ranking_list_item_info.stExtraInfo.stDetailInfo.stMasterHero.stAcntInfo;
                        if (stAcntInfo != null)
                        {
                            text       = StringHelper.UTF8BytesToString(ref stAcntInfo.szPlayerName);
                            dwPvpLevel = stAcntInfo.dwPvpLevel;
                            serverUrl  = Singleton <ApolloHelper> .GetInstance().ToSnsHeadUrl(ref stAcntInfo.szHeadUrl);

                            ullUid        = stAcntInfo.ullUid;
                            logicWorldId  = (uint)stAcntInfo.iLogicWorldId;
                            dwCurLevel    = stAcntInfo.stGameVip.dwCurLevel;
                            dwHeadIconId  = stAcntInfo.stGameVip.dwHeadIconId;
                            privilegeType = (COM_PRIVILEGE_TYPE)stAcntInfo.bPrivilege;
                            dwVipLevel    = stAcntInfo.dwVipLevel;
                        }
                        MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.WxIcon, privilegeType, ApolloPlatform.Wechat, true, false);

                        MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.QqIcon, privilegeType, ApolloPlatform.QQ, true, false);

                        MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.GuestIcon, privilegeType, ApolloPlatform.Guest, true, false);

                        SetGameObjChildText(objElement, "NameGroup/PlayerName", text);
                        SetGameObjChildText(objElement, "PlayerLv", string.Format("Lv.{0}", Math.Max(1, dwPvpLevel)));
                        SetUrlHeadIcon(component.HeadIcon, serverUrl);
                        SetPlatChannel(objElement, logicWorldId);
                        component.LadderGo.CustomSetActive(false);
                        objElement.transform.FindChild("Value").gameObject.CustomSetActive(true);
                        objElement.transform.FindChild("ValueType").gameObject.CustomSetActive(true);
                        component.FindBtn.CustomSetActive(true);
                        component.FindBtn.GetComponent <CUIEventScript>().m_onClickEventParams.tag = viewIndex;
                        Utility.FindChild(component.FindBtn, "Select").CustomSetActive(false);
                        uint     num7 = (csdt_ranking_list_item_info.stExtraInfo.stDetailInfo.stMasterHero.dwWinCnt * 100) / csdt_ranking_list_item_info.stExtraInfo.stDetailInfo.stMasterHero.dwGameCnt;
                        string[] args = new string[] { num7.ToString(), csdt_ranking_list_item_info.stExtraInfo.stDetailInfo.stMasterHero.dwWinCnt.ToString() };
                        SetGameObjChildText(objElement, "ValueType", Singleton <CTextManager> .GetInstance().GetText("ranking_ItemHeroMasterName", args));
                        SetGameObjChildText(objElement, "Value", string.Empty);
                        uint rankNumber = (uint)(viewIndex + 1);
                        RankingNumSet(rankNumber, component);
                        component.AddFriend.CustomSetActive(false);
                        component.SendCoin.CustomSetActive(false);
                        component.Online.CustomSetActive(false);
                        if (dwVipLevel == 0xdf1f9)
                        {
                            MonoSingleton <NobeSys> .GetInstance().SetMyQQVipHead(component.QqVip.GetComponent <Image>());
                        }
                        else
                        {
                            MonoSingleton <NobeSys> .GetInstance().SetOtherQQVipHead(component.QqVip.GetComponent <Image>(), (int)dwVipLevel);
                        }
                        MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component.VipIcon.GetComponent <Image>(), (int)dwCurLevel, false);

                        MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(component.HeadIconFrame.GetComponent <Image>(), (int)dwHeadIconId);
                    }
                }
            }
        }
Beispiel #12
0
        public static void UpdateOneGodElement(GameObject objElement, int viewIndex, CSDT_RANKING_LIST_SUCC curRankingList)
        {
            if (curRankingList == null)
            {
                return;
            }
            if (objElement == null)
            {
                return;
            }
            RankingItemHelper component = objElement.GetComponent <RankingItemHelper>();

            if (component == null)
            {
                return;
            }
            CSDT_RANKING_LIST_ITEM_INFO cSDT_RANKING_LIST_ITEM_INFO = curRankingList.astItemDetail[viewIndex];

            if (cSDT_RANKING_LIST_ITEM_INFO == null)
            {
                return;
            }
            string             text          = string.Empty;
            uint               num           = 1u;
            string             serverUrl     = null;
            uint               logicWorldId  = 0u;
            uint               level         = 0u;
            uint               headIdx       = 0u;
            uint               num2          = 0u;
            COM_PRIVILEGE_TYPE privilegeType = 0;
            COMDT_RANKING_LIST_ITEM_EXTRA_PLAYER stAcntInfo = cSDT_RANKING_LIST_ITEM_INFO.stExtraInfo.stDetailInfo.get_stMasterHero().stAcntInfo;

            if (stAcntInfo != null)
            {
                text      = StringHelper.UTF8BytesToString(ref stAcntInfo.szPlayerName);
                num       = stAcntInfo.dwPvpLevel;
                serverUrl = Singleton <ApolloHelper> .GetInstance().ToSnsHeadUrl(ref stAcntInfo.szHeadUrl);

                ulong ullUid = stAcntInfo.ullUid;
                logicWorldId  = (uint)stAcntInfo.iLogicWorldId;
                level         = stAcntInfo.stGameVip.dwCurLevel;
                headIdx       = stAcntInfo.stGameVip.dwHeadIconId;
                privilegeType = stAcntInfo.bPrivilege;
                num2          = stAcntInfo.dwVipLevel;
            }
            MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.WxIcon, privilegeType, 1, true, false);

            MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.QqIcon, privilegeType, 2, true, false);

            MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.GuestIcon, privilegeType, 5, true, false);

            RankingView.SetGameObjChildText(objElement, "NameGroup/PlayerName", text);
            RankingView.SetGameObjChildText(objElement, "PlayerLv", string.Format("Lv.{0}", Math.Max(1u, num)));
            RankingView.SetUrlHeadIcon(component.HeadIcon, serverUrl);
            RankingView.SetPlatChannel(objElement, logicWorldId);
            component.LadderGo.CustomSetActive(false);
            objElement.transform.FindChild("Value").gameObject.CustomSetActive(true);
            objElement.transform.FindChild("ValueType").gameObject.CustomSetActive(true);
            component.FindBtn.CustomSetActive(true);
            component.FindBtn.GetComponent <CUIEventScript>().m_onClickEventParams.tag = viewIndex;
            Utility.FindChild(component.FindBtn, "Select").CustomSetActive(false);
            float num3 = CPlayerProfile.Divide(cSDT_RANKING_LIST_ITEM_INFO.stExtraInfo.stDetailInfo.get_stMasterHero().dwWinCnt * 100u, cSDT_RANKING_LIST_ITEM_INFO.stExtraInfo.stDetailInfo.get_stMasterHero().dwGameCnt);

            if (RankingView.RANK_GOD_WIN_CNT == 0u)
            {
                RankingView.RANK_GOD_WIN_CNT = GameDataMgr.globalInfoDatabin.GetDataByKey(226u).dwConfValue;
            }
            if (cSDT_RANKING_LIST_ITEM_INFO.stExtraInfo.stDetailInfo.get_stMasterHero().dwWinCnt >= RankingView.RANK_GOD_WIN_CNT)
            {
                RankingView.SetGameObjChildText(objElement, "ValueType", Singleton <CTextManager> .GetInstance().GetText("ranking_ItemHeroMasterName", new string[]
                {
                    num3.ToString("F2"),
                    cSDT_RANKING_LIST_ITEM_INFO.stExtraInfo.stDetailInfo.get_stMasterHero().dwWinCnt.ToString()
                }));
            }
            else
            {
                RankingView.SetGameObjChildText(objElement, "ValueType", Singleton <CTextManager> .GetInstance().GetText("ranking_ItemHeroMasterNameLess100", new string[]
                {
                    cSDT_RANKING_LIST_ITEM_INFO.stExtraInfo.stDetailInfo.get_stMasterHero().dwWinCnt.ToString()
                }));
            }
            RankingView.SetGameObjChildText(objElement, "Value", string.Empty);
            uint rankNumber = (uint)(viewIndex + 1);

            RankingView.RankingNumSet(rankNumber, component);
            component.AddFriend.CustomSetActive(false);
            component.SendCoin.CustomSetActive(false);
            component.Online.CustomSetActive(false);
            if (num2 == 913913u)
            {
                MonoSingleton <NobeSys> .GetInstance().SetMyQQVipHead(component.QqVip.GetComponent <Image>());
            }
            else
            {
                MonoSingleton <NobeSys> .GetInstance().SetOtherQQVipHead(component.QqVip.GetComponent <Image>(), (int)num2);
            }
            MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component.VipIcon.GetComponent <Image>(), (int)level, false);

            MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(component.HeadIconFrame.GetComponent <Image>(), (int)headIdx);
        }
Beispiel #13
0
        private void RefreshRankList()
        {
            if (this._rankingBtn != null)
            {
                CUIListScript componetInChild = Utility.GetComponetInChild <CUIListScript>(this._rankingBtn, "RankingList");
                int           amount          = 0;
                if (this.m_rankingType == RankingSystem.RankingSubView.Friend)
                {
                    this.myRankingNo = Singleton <RankingSystem> .instance.GetMyFriendRankNo();

                    if (this.myRankingNo != -1)
                    {
                        this.rankFriendList = Singleton <CFriendContoller> .instance.model.GetSortedRankingFriendList(COM_APOLLO_TRANK_SCORE_TYPE.COM_APOLLO_TRANK_SCORE_TYPE_LADDER_POINT);

                        if (this.rankFriendList != null)
                        {
                            amount = this.rankFriendList.Count + 1;
                            componetInChild.SetElementAmount(amount);
                            CUIListElementScript elemenet = null;
                            GameObject           go       = null;
                            for (int i = 0; i < amount; i++)
                            {
                                elemenet = componetInChild.GetElemenet(i);
                                if (elemenet != null)
                                {
                                    go = elemenet.gameObject;
                                    if (go != null)
                                    {
                                        this.OnUpdateRankingFriendElement(go, i);
                                    }
                                }
                            }
                        }
                    }
                }
                else if (this.m_rankingType == RankingSystem.RankingSubView.All)
                {
                    CSDT_RANKING_LIST_SUCC rankList = Singleton <RankingSystem> .instance.GetRankList(RankingSystem.RankingType.Ladder);

                    if (rankList != null)
                    {
                        amount = (int)rankList.dwItemNum;
                        componetInChild.SetElementAmount(amount);
                        CUIListElementScript script3    = null;
                        GameObject           gameObject = null;
                        for (int j = 0; j < amount; j++)
                        {
                            script3 = componetInChild.GetElemenet(j);
                            if (script3 != null)
                            {
                                gameObject = script3.gameObject;
                                if (gameObject != null)
                                {
                                    this.OnUpdateRankingAllElement(gameObject, j);
                                }
                            }
                        }
                    }
                }
            }
        }