修复大闹天宫招募带有宝物的英雄会导致登陆卡死的问题,针对装备丢失添加判空操作避免登陆卡死

dev_chengFeng
JieLing 2020-09-27 15:09:28 +08:00
parent 4c9db13851
commit e9159cc1ca
2 changed files with 42 additions and 40 deletions

View File

@ -100,12 +100,12 @@ function this.InitExpeditionData(msg)
--if msg.removesHeroIds then
-- this.DeleteHeroDatas(msg.removesHeroIds)
--end
--招募的英雄
this.InitHeroDatas(msg.heroList)
--装备
this.InitEquipData(msg.equip)
--宝器
this.InitBaoDatas(msg.soulEquip)
--招募的英雄
this.InitHeroDatas(msg.heroList)
--猎妖开启时间
this.startTime = msg.startTime

View File

@ -1069,52 +1069,54 @@ local function CalculateEquipTreaSureAddVal(_heroId)
local curEuipTreaSureData =
EquipTreasureManager.GetSingleTreasureByIdDyn(did) or
ExpeditionManager.GetSingleTreasureByIdDyn(did)
local curEuipTreaSureConfig = jewelConfig[curEuipTreaSureData.id]
for _, configInfo in ConfigPairs(jewelRankupConfig) do
--强化的属性
if
configInfo.PoolID == curEuipTreaSureConfig.LevelupPool and configInfo.Type == 1 and
configInfo.Level == curEuipTreaSureData.lv
then
for j = 1, #configInfo.Property do
if addAllProVal[configInfo.Property[j][1]] then
addAllProVal[configInfo.Property[j][1]] =
addAllProVal[configInfo.Property[j][1]] + configInfo.Property[j][2]
else
addAllProVal[configInfo.Property[j][1]] = configInfo.Property[j][2]
if curEuipTreaSureData then
local curEuipTreaSureConfig = jewelConfig[curEuipTreaSureData.id]
for _, configInfo in ConfigPairs(jewelRankupConfig) do
--强化的属性
if
configInfo.PoolID == curEuipTreaSureConfig.LevelupPool and configInfo.Type == 1 and
configInfo.Level == curEuipTreaSureData.lv
then
for j = 1, #configInfo.Property do
if addAllProVal[configInfo.Property[j][1]] then
addAllProVal[configInfo.Property[j][1]] =
addAllProVal[configInfo.Property[j][1]] + configInfo.Property[j][2]
else
addAllProVal[configInfo.Property[j][1]] = configInfo.Property[j][2]
end
end
end
--精炼的属性
if
configInfo.PoolID == curEuipTreaSureConfig.RankupPool and configInfo.Type == 2 and
configInfo.Level == curEuipTreaSureData.refineLv
then
for j = 1, #configInfo.Property do
if addAllProVal[configInfo.Property[j][1]] then
addAllProVal[configInfo.Property[j][1]] =
addAllProVal[configInfo.Property[j][1]] + configInfo.Property[j][2]
else
addAllProVal[configInfo.Property[j][1]] = configInfo.Property[j][2]
end
end
end
end
--精炼的属性
if
configInfo.PoolID == curEuipTreaSureConfig.RankupPool and configInfo.Type == 2 and
configInfo.Level == curEuipTreaSureData.refineLv
then
for j = 1, #configInfo.Property do
if addAllProVal[configInfo.Property[j][1]] then
addAllProVal[configInfo.Property[j][1]] =
addAllProVal[configInfo.Property[j][1]] + configInfo.Property[j][2]
else
addAllProVal[configInfo.Property[j][1]] = configInfo.Property[j][2]
if #curHeroData.jewels > 1 then
--取 强化 精炼 最小值
if minLv then
if curEuipTreaSureData.lv < minLv then
minLv = curEuipTreaSureData.lv
end
end
end
end
if #curHeroData.jewels > 1 then
--取 强化 精炼 最小值
if minLv then
if curEuipTreaSureData.lv < minLv then
else
minLv = curEuipTreaSureData.lv
end
else
minLv = curEuipTreaSureData.lv
end
if mainRefineLv then
if curEuipTreaSureData.refineLv < mainRefineLv then
if mainRefineLv then
if curEuipTreaSureData.refineLv < mainRefineLv then
mainRefineLv = curEuipTreaSureData.refineLv
end
else
mainRefineLv = curEuipTreaSureData.refineLv
end
else
mainRefineLv = curEuipTreaSureData.refineLv
end
end
end