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