【特权商城】 前端加等级限制 有表!!!

zhangqiang 2020-11-05 16:44:58 +08:00
parent a85abaa2a0
commit 3a7ff72e45
1 changed files with 11 additions and 1 deletions

View File

@ -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)