【礼包】获取结束时间时添加判空操作
parent
40768a423d
commit
cf878427ef
|
|
@ -256,7 +256,7 @@ end
|
||||||
-- 根据类型判断相应的物品是否开启并返回相应的ID
|
-- 根据类型判断相应的物品是否开启并返回相应的ID
|
||||||
function this.GetActiveGoodsIDByType(goodsType)
|
function this.GetActiveGoodsIDByType(goodsType)
|
||||||
for goodsId, endTime in pairs(_GoodsDurationData) do
|
for goodsId, endTime in pairs(_GoodsDurationData) do
|
||||||
if rechargeConfig[goodsId].Type == goodsType and endTime > GetTimeStamp() then
|
if rechargeConfig[goodsId] and rechargeConfig[goodsId].Type == goodsType and endTime > GetTimeStamp() then
|
||||||
return goodsId, endTime
|
return goodsId, endTime
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue