Esempio n. 1
0
        public List <CSCommon.ShopItemInfo> _GetShopItems(CSCommon.eShopType type)
        {
            var shopcn = CSCommon.ShopCommon.Instance;

            if (shopcn == null)
            {
                return(null);
            }
            List <CSCommon.ShopItemInfo> list = null;

            switch ((CSCommon.eShopType)type)
            {
            case CSCommon.eShopType.HotItem:
                list = shopcn.ItemList;
                break;

            case CSCommon.eShopType.Drug:
                list = shopcn.DrugList;
                break;

            case CSCommon.eShopType.Mount:
                list = shopcn.MountList;
                break;

            case CSCommon.eShopType.Rmb:
                list = shopcn.RmbList;
                break;
            }
            return(list);
        }
Esempio n. 2
0
        public CSCommon.ShopItemInfo _GetShopItemInfo(CSCommon.eShopType type, int id)
        {
            var list = _GetShopItems((CSCommon.eShopType)type);

            if (list == null)
            {
                return(null);
            }
            foreach (var i in list)
            {
                if (i.Id == id)
                {
                    return(i);
                }
            }
            return(null);
        }