【容错】登录容错添加,服务器发送不存在的活动时,不再卡死
parent
3205cdf5d0
commit
9d7a51fd57
|
|
@ -137,7 +137,7 @@ function this.InitActivityServerData(msg, isUpdate)
|
|||
this.mission = {}
|
||||
end
|
||||
for i, v in ipairs(msg.activityInfo) do
|
||||
|
||||
if GlobalActivity[v.activityId] then
|
||||
this.CheckMoneyProgress(v)
|
||||
this.mission[v.activityId] = v
|
||||
|
||||
|
|
@ -179,6 +179,9 @@ function this.InitActivityServerData(msg, isUpdate)
|
|||
end
|
||||
end
|
||||
this.CheckActiveIsOpen(v)
|
||||
else
|
||||
LogError("服务器发送了前端不存在的活动ID:"..v.activityId)
|
||||
end
|
||||
end
|
||||
TreasureOfSomebodyManagerV2.SetTreasureLocalData()
|
||||
this.OnlineStartCountDown()
|
||||
|
|
@ -503,7 +506,9 @@ end
|
|||
|
||||
-- 检测进度
|
||||
function this.CheckMoneyProgress(v)
|
||||
local type = ConfigManager.GetConfigData(ConfigName.GlobalActivity,v.activityId).Type
|
||||
local act = ConfigManager.TryGetConfigData(ConfigName.GlobalActivity, v.activityId)
|
||||
if act then
|
||||
local type = act.Type
|
||||
if type == ActivityTypeDef.FirstRecharge
|
||||
or type == ActivityTypeDef.LuckyCat
|
||||
or type == ActivityTypeDef.DailyRecharge
|
||||
|
|
@ -518,6 +523,7 @@ function this.CheckMoneyProgress(v)
|
|||
v.value = v.value / 1000
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--刷新某个活动的数据进度
|
||||
|
|
|
|||
|
|
@ -36,7 +36,8 @@ function this.InitData(func)
|
|||
end
|
||||
|
||||
function this.InitDataList(id)
|
||||
local configs = ConfigManager.GetAllConfigsDataByKey(ConfigName.LingLongPool,"ActivityId",id)
|
||||
local configs = ConfigManager.TryGetConfigDataByKey(ConfigName.LingLongPool,"ActivityId",id)
|
||||
if configs then
|
||||
for i = 1 ,#configs do
|
||||
local data = {}
|
||||
data.id = configs[i].Id
|
||||
|
|
@ -48,6 +49,9 @@ function this.InitDataList(id)
|
|||
data.state = 0
|
||||
rewardList[configs[i].Id] = data
|
||||
end
|
||||
else
|
||||
LogError("LingLongPool 中未找到 ActivityId :".. id)
|
||||
end
|
||||
end
|
||||
|
||||
function this.GetRewardList()
|
||||
|
|
|
|||
Loading…
Reference in New Issue