diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua index 16e6603cf3..31c8721c8d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua @@ -135,7 +135,17 @@ function this.GetGiftGoodsInfo(goodsType, Id) end function this.GetGiftGoodsInfoList(type) - return giftGoodsInfoList[type] and giftGoodsInfoList[type] or {} + -- return giftGoodsInfoList[type] and giftGoodsInfoList[type] or {} + if not giftGoodsInfoList[type] then + return {} + end + local newGiftGoodsInfoList = {} + for k,v in pairs(giftGoodsInfoList[type]) do + if rechargeConfig[v.goodsId] and PlayerManager.level >= rechargeConfig[v.goodsId].LevelLinit[1] and PlayerManager.level <= rechargeConfig[v.goodsId].LevelLinit[2] then + table.insert(newGiftGoodsInfoList,v) + end + end + return newGiftGoodsInfoList end function this.RefreshGiftGoodsBuyTimes(goodsType, goodsId, buyTimes)