public static void Add(LobbyShopData data) { if (!shopData.Contains(data)) { shopData.Add(data); UILobbyShopItem item = new UILobbyShopItem(data); UILobbyShopItemMgr._self.Add(item); } }
public static int GetForbid(int itemType) { LobbyShopData data = shopData.Find(iter => { return(iter.itemtype == itemType); }); if (data != null) { return(data.forbid); } return(-1); }
public static int GetTab(int id) { LobbyShopData data = shopData.Find(iter => { return(iter.id == id); }); if (data != null) { return(data.tab); } return(-1); }
public static int GetPrice(int id) { LobbyShopData data = shopData.Find(iter => { return(iter.id == id); }); if (data != null) { return(data.price * data.rebate / 100); } return(-1); }
public static void AddAll(LobbyShopData[] data) { for (int i = 0; i < data.Length; i++) { LobbyShopData item = shopData.Find(iter => iter.id == data[i].id); if (item == null) { Add(data[i]); } } UILobbyShopItemMgr._self.MallItemEvent(0, Mall_Tab.tab_Hot); }
public UILobbyShopItem(LobbyShopData data) { _data = data; if (_data != null) { _itemData = ItemProto.Mgr.Instance.Get(_data.itemtype); } if (_itemData == null) { Debug.LogError("lobby shop _itemData is null itemtype = " + _data.itemtype); } }
public static void Remove(LobbyShopData data) { shopData.Remove(data); }