From cdfb7277f910c84465e3489369f2427ee7e07773 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Wed, 9 Jun 2021 11:49:11 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=A4=BC=E5=8C=85=E3=80=91=E7=A4=BC?= =?UTF-8?q?=E5=8C=85=E4=B8=8D=E5=AD=98=E5=9C=A8=E6=B7=BB=E5=8A=A0=E5=88=A4?= =?UTF-8?q?=E7=A9=BA=E6=93=8D=E4=BD=9C=EF=BC=8C=E4=B8=8D=E5=86=8D=E5=8D=A1?= =?UTF-8?q?=E6=AD=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Operating/OperatingManager.lua | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) 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