少年修仙传客户端代码仓库
client_Zxw
2018-11-14 252d46b8642ad4ecebe1a8b9d3a0678913413ebf
System/KnapSack/FBHelpPointExchageModel.cs
@@ -128,7 +128,9 @@
            for(int i = 0; i < helpPointShoplist.Count; i++)
            {
                var shopId = helpPointShoplist[i];
                if (!CheckShopIsCanBuy(shopId))
                StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(shopId);
                int remainNum = 0;
                if (storeModel.TryGetIsSellOut(storeConfig,out remainNum))
                {
                    RemoveHelpPointShop(shopId);
                }
@@ -180,28 +182,6 @@
                    break;
            }
            return true;
        }
        public bool CheckShopIsCanBuy(int shopId)
        {
            StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(shopId);
            if (storeConfig == null) return false;
            int canBuyCnt = 0;
            int addBuyCnt = 0;
            bool isLimitBuy = BuyItemPopModel.Instance.CheckIsLimitBuyCnt(storeConfig, out canBuyCnt, out addBuyCnt);
            BuyShopItemLimit shopItemLimit = storeModel.GetBuyShopLimit((uint)storeConfig.ID);
            int remainNum = canBuyCnt;
            if (shopItemLimit != null)
            {
                remainNum -= shopItemLimit.BuyCnt;
            }
            List<StoreConfig> list = StoreConfig.GetSellShoplist();
            if (remainNum > 0 && list.Contains(storeConfig))
            {
                return true;
            }
            return false;
        }
    }
}