From 252d46b8642ad4ecebe1a8b9d3a0678913413ebf Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期三, 14 十一月 2018 15:30:58 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/KnapSack/FBHelpPointExchageModel.cs | 26 +++-----------------------
1 files changed, 3 insertions(+), 23 deletions(-)
diff --git a/System/KnapSack/FBHelpPointExchageModel.cs b/System/KnapSack/FBHelpPointExchageModel.cs
index d628bdb..a974fba 100644
--- a/System/KnapSack/FBHelpPointExchageModel.cs
+++ b/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;
}
}
}
--
Gitblit v1.8.0