Example #1
0
 public static void Add(LobbyShopData data)
 {
     if (!shopData.Contains(data))
     {
         shopData.Add(data);
         UILobbyShopItem item = new UILobbyShopItem(data);
         UILobbyShopItemMgr._self.Add(item);
     }
 }
Example #2
0
    public static int GetForbid(int itemType)
    {
        LobbyShopData data = shopData.Find(iter => { return(iter.itemtype == itemType); });

        if (data != null)
        {
            return(data.forbid);
        }
        return(-1);
    }
Example #3
0
    public static int GetTab(int id)
    {
        LobbyShopData data = shopData.Find(iter => { return(iter.id == id); });

        if (data != null)
        {
            return(data.tab);
        }
        return(-1);
    }
Example #4
0
    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);
    }
Example #5
0
 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);
 }
Example #6
0
 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);
     }
 }
Example #7
0
 public static void Remove(LobbyShopData data)
 {
     shopData.Remove(data);
 }