From 3a7ff72e45ab298466cb7e5a02255cbf7f3d6aae Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Thu, 5 Nov 2020 16:44:58 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=89=B9=E6=9D=83=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E3=80=91=20=E5=89=8D=E7=AB=AF=E5=8A=A0=E7=AD=89=E7=BA=A7?= =?UTF-8?q?=E9=99=90=E5=88=B6=20=20=E6=9C=89=E8=A1=A8=EF=BC=81=EF=BC=81?= =?UTF-8?q?=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Operating/OperatingManager.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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)