| | |
| | | #endregion |
| | | |
| | | #region 皇权礼包 |
| | | |
| | | //没售罄 |
| | | public bool IsCanBuyToday(int ctgID) |
| | | { |
| | | CTGConfig config = CTGConfig.Get(ctgID); |
| | | if (config == null) return false; |
| | | if (!RechargeManager.Instance.TryGetRechargeCount(ctgID, out var rechargeCount)) return false; |
| | | |
| | | if (config.DailyBuyCount == 0) return true; |
| | | return rechargeCount.todayCount < config.DailyBuyCount; |
| | | } |
| | | |
| | | public bool IsNoSellOutCTGID(int ctgID) |
| | | { |
| | | CTGConfig config = CTGConfig.Get(ctgID); |
| | |
| | | { |
| | | res = res.OrderBy(item => |
| | | { |
| | | bool isCanBuy = item.type == 0 ? IsNoSellOutShopID(item.id) : IsNoSellOutCTGID(item.id); |
| | | bool isCanBuy = item.type == 0 ? IsNoSellOutShopID(item.id) : IsCanBuyToday(item.id); |
| | | return !isCanBuy; |
| | | }) |
| | | .ThenBy(item => item.type) |