diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua index 185a9fc7b9..f1c5287d38 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua @@ -38,15 +38,19 @@ function this.SetBasicValues(giftGoodsList) end for _, giftGoodsInfo in ipairs(giftGoodsList) do if giftGoodsInfo.goodsId and giftGoodsInfo.goodsId ~= 0 then - local rechargeConfigLocal = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig, giftGoodsInfo.goodsId) - -- LogBlue("------充值活动-----------礼包类型:".. rechargeConfigLocal.Type .." 礼包ID:".. giftGoodsInfo.goodsId .." 已购:" - -- ..giftGoodsInfo.buyTimes.." 开始:"..giftGoodsInfo.startTime.." 结束:" - -- ..giftGoodsInfo.endTime .. " 可购(没卵用):" .. giftGoodsInfo.dynamicBuyTimes) - if giftGoodsInfo.endTime == 0 and giftGoodsInfo.startTime == 0 and (rechargeConfigLocal.ShowType == 25 or rechargeConfigLocal.ShowType == 26 or rechargeConfigLocal.ShowType == 8) then - else - if giftGoodsInfoList[rechargeConfigLocal.Type] then - table.insert(giftGoodsInfoList[rechargeConfigLocal.Type], giftGoodsInfo) + local rechargeConfigLocal = ConfigManager.TryGetConfigData(ConfigName.RechargeCommodityConfig, giftGoodsInfo.goodsId) + if rechargeConfigLocal then + -- LogBlue("------充值活动-----------礼包类型:".. rechargeConfigLocal.Type .." 礼包ID:".. giftGoodsInfo.goodsId .." 已购:" + -- ..giftGoodsInfo.buyTimes.." 开始:"..giftGoodsInfo.startTime.." 结束:" + -- ..giftGoodsInfo.endTime .. " 可购(没卵用):" .. giftGoodsInfo.dynamicBuyTimes) + if giftGoodsInfo.endTime == 0 and giftGoodsInfo.startTime == 0 and (rechargeConfigLocal.ShowType == 25 or rechargeConfigLocal.ShowType == 26 or rechargeConfigLocal.ShowType == 8) then + else + if giftGoodsInfoList[rechargeConfigLocal.Type] then + table.insert(giftGoodsInfoList[rechargeConfigLocal.Type], giftGoodsInfo) + end end + else + LogError("服务器发过来一个前端表中不存在的礼包:"..giftGoodsInfo.goodsId) end end end