//更新每个限购物品 private void updateLimitGoods(Transform item, SysVipMallVo mallVo, LimitGoods limitInfo) { SysItemVo itemVo = BaseDataMgr.instance.GetDataById <SysItemVo>((uint)mallVo.id); Singleton <ItemManager> .Instance.InitItem(item.gameObject, (uint)itemVo.id, ItemType.BaseGoods); item.FindChild("nameLabel").GetComponent <UILabel>().text = itemVo.name; item.FindChild("goldLabel").GetComponent <UILabel>().text = string.Empty + mallVo.curr_price; item.FindChild("limitValueLabel").GetComponent <UILabel>().text = string.Empty + limitInfo.count; }
//限购信息返回 private void Fun_15_2(INetData data) { MallLimitInfoMsg_15_2 limitInfoMsg = new MallLimitInfoMsg_15_2(); limitInfoMsg.read(data.GetMemoryStream()); foreach (PLimitGoods pLimitGoods in limitInfoMsg.limit) { LimitGoods limitGoods = new LimitGoods(); limitGoods.pos = pLimitGoods.pos; limitGoods.id = pLimitGoods.id; limitGoods.price = pLimitGoods.price; limitGoods.sum = pLimitGoods.sum; limitGoods.count = pLimitGoods.count; Singleton <StoreMode> .Instance.UpdateLimitedArr(limitGoods.pos - 1, limitGoods); } Singleton <StoreMode> .Instance.UpdateLimited((int)limitInfoMsg.remainTime); }
//更新限购相关数据列表 public void UpdateLimitedArr(int pos, LimitGoods limitedGoods) { limitInfoArr [pos] = limitedGoods; limitedGoodsArr [pos] = BaseDataMgr.instance.GetSysVipMallVo(limitedGoods.id, (uint)StoreShopConst.GoodType.Limit); limitedGoodsArr [pos].curr_price = (int)limitedGoods.price; }