| | |
| | | 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);
|
| | | }
|
| | |
| | | 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;
|
| | | }
|
| | | }
|
| | | }
|