//接收捐卡榜数据 public void OnRecvRequestDonateRankData(IntPtr ptr, int nLen) { IntPtrVaArgParseHelper helper = new IntPtrVaArgParseHelper(ptr, nLen); cmd_Entity_Rank_Info_head head = helper.get <cmd_Entity_Rank_Info_head>(); DonateChartList.AllDataList.Clear(); for (int i = 0; i < head.nCount; i++) { cmd_entity_donate_order_info data = helper.get <cmd_entity_donate_order_info>(); if (EntityFactory.MainHeroView != null && EntityFactory.MainHeroView.Property != null) { if ((int)data.nPDBID == EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID)) { DonateChartList.PersonalRank = (int)data.nOrder; } ; } DonateChartList.AllDataList.Add(data); } if (DonateChartList.AllDataList.Count > 0) { DonateChartList.LastScore = DonateChartList.AllDataList[head.nCount - 1].nTotalClanCtrb; } UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_RECVREQUESTDONATECHARTDATA, null); }
public void SetData(cmd_entity_donate_order_info info) { index.text = info.nOrder.ToString(); playerName.text = info.szName; DonateNum.text = info.nClanCtrb.ToString(); totalNum.text = info.nTotalClanCtrb.ToString(); clanName.text = info.szClanName.ToString(); sexIcon.sprite = USpriteManager.Instance.GetSprite(USpriteManager.ESpriteType.EST_KinSex, WndID.WND_ID_CHART, (int)info.bySex + 1); sexIcon.gameObject.SetActive(true); if (popupMenuHandle == null) popupMenuHandle = this.gameObject.AddComponent<UPopupMenuHandle>(); UPopupAction PopupAction = new UPopupAction(); PopupAction.Add(UPopupItemDataGetPlayerDetail.GetDescString(), new UPopupItemDataGetPlayerDetail((int)info.nPDBID)); popupMenuHandle.HandlePopupAction = PopupAction; bool bTop3 = false; if (info.nOrder == 1 || info.nOrder == 2 || info.nOrder == 3) { bTop3 = true; indexIcon.gameObject.SetActive(true); indexIcon.sprite = top3IndexIcons[info.nOrder - 1]; index.gameObject.SetActive(false); } if (!U3D_Render.EntityView.isNullOrEmpty(EntityFactory.MainHeroView)) { if (EntityFactory.MainHeroView.Property) { if (EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID) == info.nPDBID) { bSelfItem = true; borderImg.sprite = borderList[1]; } } } Color txtColor = bTop3 ? top3TextColor[info.nOrder - 1] : Color.white; index.color = txtColor; playerName.color = txtColor; DonateNum.color = txtColor; totalNum.color = txtColor; clanName.color = txtColor; }