private void SelectRankMatchType(CUIEvent uiEvt)
        {
            uint tagUInt = uiEvt.m_eventParams.tagUInt;
            enUnionRankMatchType commonUInt32Param = (enUnionRankMatchType)uiEvt.m_eventParams.commonUInt32Param1;

            if (this.m_CurSelMapId == tagUInt)
            {
                return;
            }
            this.m_CurSelMapId         = tagUInt;
            this.m_CurSelRankMatchType = commonUInt32Param;
            this.m_CurMapInfo          = CUnionBattleEntrySystem.GetUnionBattleMapInfoByMapID(this.m_CurSelMapId);
            this.m_CurSelRankType      = CUnionBattleRankSystem.ConvertSeverToLocalRankType(this.m_CurMapInfo.dwRankType);
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CUnionBattleRankSystem.UNION_RANK_PATH);

            if (form == null)
            {
                return;
            }
            if (this.IsNeedToRetrieveRankTypeInfo(this.m_CurSelRankType))
            {
                this.RetrieveRankTypeInfo(this.m_CurSelRankType);
            }
            this.RefreshWinCntRankList();
            this.RefreshAcntInfo();
        }
예제 #2
0
        public void CheckActPlayModeTipsForLobby()
        {
            uint result = 0;

            uint.TryParse(Singleton <CTextManager> .instance.GetText("MapID_PVP_Fire"), out result);
            stMatchOpenInfo matchOpenState = CUICommonSystem.GetMatchOpenState(RES_BATTLE_MAP_TYPE.RES_BATTLE_MAP_TYPE_ENTERTAINMENT, result);
            CUIFormScript   form           = Singleton <CUIManager> .instance.GetForm(LobbyForm.FORM_PATH);

            if (form != null)
            {
                if (!CSysDynamicBlock.bLobbyEntryBlocked)
                {
                    Transform transform = form.transform.Find("BtnCon/PvpBtn/ActModePanel");
                    if (transform != null)
                    {
                        transform.SetAsLastSibling();
                        transform.gameObject.CustomSetActive(matchOpenState.matchState == enMatchOpenState.enMatchOpen_InActiveTime);
                    }
                }
                Transform transform2 = form.transform.FindChild("BtnCon/UnionBtn/ShangJin");
                if (transform2 != null)
                {
                    transform2.SetAsLastSibling();
                    transform2.gameObject.CustomSetActive(CUnionBattleEntrySystem.HasMatchInActiveTime());
                }
            }
        }
        private void RefreshAcntInfo()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CUnionBattleRankSystem.UNION_RANK_PATH);

            if (form == null)
            {
                return;
            }
            CSDT_RANKING_LIST_ITEM_INFO actRankInfo = this.GetActRankInfo(this.m_CurSelRankType);
            CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

            GameObject        widget    = form.GetWidget(1);
            RankingItemHelper component = widget.GetComponent <RankingItemHelper>();
            uint num = 0u;

            if (actRankInfo != null && masterRoleInfo != null)
            {
                widget.CustomSetActive(true);
                string name  = masterRoleInfo.Name;
                uint   level = masterRoleInfo.Level;
                num = actRankInfo.dwRankNo;
                uint num2;
                if (num == 0u)
                {
                    num2 = CUnionBattleEntrySystem.GetRewardMatchStateByMapId(this.m_CurSelMapId).dwPerfectCnt;
                }
                else
                {
                    num2 = actRankInfo.dwRankScore;
                }
                widget.transform.FindChild("Value").gameObject.CustomSetActive(true);
                widget.transform.FindChild("ValueType").gameObject.CustomSetActive(true);
                CUnionBattleRankSystem.SetGameObjChildText(widget, "Value", num2.ToString(CultureInfo.get_InvariantCulture()));
                CUnionBattleRankSystem.SetGameObjChildText(widget, "NameGroup/PlayerName", masterRoleInfo.Name);
                CUnionBattleRankSystem.SetGameObjChildText(widget, "PlayerLv", string.Format("Lv.{0}", level.ToString(CultureInfo.get_InvariantCulture())));
            }
            CUnionBattleRankSystem.RankNobSet(num, component);
            MonoSingleton <NobeSys> .GetInstance().SetMyQQVipHead(component.QqVip.GetComponent <Image>());

            GameObject gameObject = widget.transform.FindChild("HeadItemCell").gameObject;

            CUICommonSystem.SetHostHeadItemCell(gameObject);
            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);
        }
예제 #4
0
        private void RefreshAcntInfo()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(UNION_RANK_PATH);

            if (form != null)
            {
                CSDT_RANKING_LIST_ITEM_INFO actRankInfo = this.GetActRankInfo(this.m_CurSelRankType);
                CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo();

                GameObject        widget    = form.GetWidget(1);
                RankingItemHelper component = widget.GetComponent <RankingItemHelper>();
                uint rankNumber             = 0;
                if ((actRankInfo != null) && (masterRoleInfo != null))
                {
                    widget.CustomSetActive(true);
                    string name  = masterRoleInfo.Name;
                    uint   level = masterRoleInfo.Level;
                    rankNumber = actRankInfo.dwRankNo;
                    uint dwPerfectCnt = 0;
                    if (rankNumber == 0)
                    {
                        dwPerfectCnt = CUnionBattleEntrySystem.GetRewardMatchStateByMapId(this.m_CurSelMapId).dwPerfectCnt;
                    }
                    else
                    {
                        dwPerfectCnt = actRankInfo.dwRankScore;
                    }
                    widget.transform.FindChild("Value").gameObject.CustomSetActive(true);
                    widget.transform.FindChild("ValueType").gameObject.CustomSetActive(true);
                    SetGameObjChildText(widget, "Value", dwPerfectCnt.ToString(CultureInfo.InvariantCulture));
                    SetGameObjChildText(widget, "NameGroup/PlayerName", masterRoleInfo.Name);
                    SetGameObjChildText(widget, "PlayerLv", string.Format("Lv.{0}", level.ToString(CultureInfo.InvariantCulture)));
                }
                RankNobSet(rankNumber, component);
                MonoSingleton <NobeSys> .GetInstance().SetMyQQVipHead(component.QqVip.GetComponent <Image>());

                CUICommonSystem.SetHostHeadItemCell(widget.transform.FindChild("HeadItemCell").gameObject);
                MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.WxIcon, Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().m_privilegeType, ApolloPlatform.Wechat, true, false);

                MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.QqIcon, Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().m_privilegeType, ApolloPlatform.QQ, true, false);

                MonoSingleton <NobeSys> .GetInstance().SetGameCenterVisible(component.GuestIcon, Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().m_privilegeType, ApolloPlatform.Guest, true, false);
            }
        }
예제 #5
0
        private void SelectRankMatchType(CUIEvent uiEvt)
        {
            uint tagUInt = uiEvt.m_eventParams.tagUInt;
            enUnionRankMatchType type = (enUnionRankMatchType)uiEvt.m_eventParams.commonUInt32Param1;

            if (this.m_CurSelMapId != tagUInt)
            {
                this.m_CurSelMapId         = tagUInt;
                this.m_CurSelRankMatchType = type;
                this.m_CurMapInfo          = CUnionBattleEntrySystem.GetUnionBattleMapInfoByMapID(this.m_CurSelMapId);
                this.m_CurSelRankType      = ConvertSeverToLocalRankType((COM_APOLLO_TRANK_SCORE_TYPE)this.m_CurMapInfo.dwRankType);
                if (Singleton <CUIManager> .GetInstance().GetForm(UNION_RANK_PATH) != null)
                {
                    if (this.IsNeedToRetrieveRankTypeInfo(this.m_CurSelRankType))
                    {
                        this.RetrieveRankTypeInfo(this.m_CurSelRankType);
                    }
                    this.RefreshWinCntRankList();
                    this.RefreshAcntInfo();
                }
            }
        }
        public void initWidget()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CUnionBattleRankSystem.UNION_RANK_PATH);

            if (form != null)
            {
                this.m_CurSelRankType      = enUnionRankType.enRankType_None;
                this.m_CurSelRankMatchType = enUnionRankMatchType.enRankMatchType_None;
                this.m_CurSelRankItemIndex = -1;
                this.m_CurSelMapId         = 0u;
                CUIListScript component           = form.GetWidget(2).GetComponent <CUIListScript>();
                int           unionBattleMapCount = CUnionBattleEntrySystem.GetUnionBattleMapCount();
                component.SetElementAmount(unionBattleMapCount);
                int num = 0;
                for (int i = 0; i < unionBattleMapCount; i++)
                {
                    ResRewardMatchLevelInfo unionBattleMapInfoByIndex = CUnionBattleEntrySystem.GetUnionBattleMapInfoByIndex(i);
                    if (CUICommonSystem.IsMatchOpened(5, unionBattleMapInfoByIndex.dwMapId))
                    {
                        CUIListElementScript elemenet = component.GetElemenet(num);
                        if (elemenet != null)
                        {
                            CUIEventScript component2 = elemenet.GetComponent <CUIEventScript>();
                            elemenet.transform.FindChild("Text").GetComponent <Text>().text = unionBattleMapInfoByIndex.szMatchName;
                            component2.m_onClickEventParams.tagUInt            = unionBattleMapInfoByIndex.dwMapId;
                            component2.m_onClickEventParams.commonUInt32Param1 = unionBattleMapInfoByIndex.dwMatchType;
                        }
                        num++;
                    }
                }
                if (num != unionBattleMapCount)
                {
                    component.SetElementAmount(num);
                }
            }
        }