public void SetData(COM_SellItem sellItem) { sellItem_ = sellItem; ItemData idata = null; BabyData bData = null; if (sellItem.item_.itemId_ != 0) { idata = ItemData.GetData((int)sellItem.item_.itemId_); name_.text = idata.name_; ItemCellUI icell = UIManager.Instance.AddItemInstCellUI(icon_, sellItem_.item_); if (icell == null) { return; } icell.ItemCount = (int)sellItem.item_.stack_; icell.showTips = true; } else { bData = BabyData.GetData((int)sellItem.baby_.properties_[(int)PropertyType.PT_TableId]); name_.text = bData._Name; Baby baby = new Baby(); baby.SetBaby(sellItem.baby_); BabyCellUI cell = UIManager.Instance.AddBabyCellUI(icon_, baby); UIManager.SetButtonEventHandler(cell.gameObject, EnumButtonEvent.OnClick, OnClickIcon, 0, 0); } price_.text = sellItem_.sellPrice.ToString(); }
void ResetItem4Buy() { for (int i = 0; i < sellListGrid_.transform.childCount; ++i) { sellListGrid_.transform.GetChild(i).GetComponent <UIButton>().isEnabled = true; } crtSelectSellItem_ = null; }
public static void AddMySelling(COM_SellItem item) { mySellingList_.Add(item); if (OnMySellingListUpdate != null) { OnMySellingListUpdate(); } }
void OnClickItem4Buy(ButtonScript obj, object args, int param1, int param2) { ResetItem4Buy(); COM_SellItem realItem = AuctionHouseSystem.crtDisplayList_[param1]; crtSelectSellItem_ = new COM_SellItem(); crtSelectSellItem_.baby_ = realItem.baby_; crtSelectSellItem_.guid_ = realItem.guid_; crtSelectSellItem_.item_ = realItem.item_; crtSelectSellItem_.guid_ = realItem.guid_; crtSelectSellItem_.sellPlayerId_ = realItem.sellPlayerId_; crtSelectSellItem_.sellPrice = realItem.sellPrice; crtSelectSellItem_.title_ = realItem.title_; obj.GetComponent <UIButton>().isEnabled = false; }