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(); }
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); } } }