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