|
|
@@ -670,6 +670,7 @@ function onLogin(human)
|
|
|
-- 不存在对应的 herogrid了
|
|
|
if not tHeroGrid then
|
|
|
table.remove(tRelicData.equipped[nRelicID], i)
|
|
|
+ print("[WinnerRelic_onLogin] 圣遗物登录移除不存在的英雄 nRelicID = "..nRelicID.." i = "..i.." nHeroIndex = "..nHeroIndex.." nHeroID = "..nHeroID)
|
|
|
else
|
|
|
local nHeroStar = tHeroGrid.star
|
|
|
if WINNERRELIC_HEROSTAR > nHeroStar then
|
|
|
@@ -680,8 +681,29 @@ function onLogin(human)
|
|
|
|
|
|
-- 移除记录的数据
|
|
|
table.remove(tRelicData.equipped[nRelicID], i)
|
|
|
+
|
|
|
+ print("[WinnerRelic_onLogin] 圣遗物登录移除星级不正常的英雄 nRelicID = "..nRelicID.." i = "..i.." nHeroIndex = "..nHeroIndex.." nHeroID = "..nHeroID)
|
|
|
+ end
|
|
|
+
|
|
|
+ -- 检查对应英雄当前穿戴
|
|
|
+ -- heroGrid.relic.relicID
|
|
|
+ -- heroGrid.relic.star
|
|
|
+ if not tHeroGrid.relic then
|
|
|
+ table.remove(tRelicData.equipped[nRelicID], i)
|
|
|
+ print("[WinnerRelic_onLogin] 圣遗物登录,英雄不存在对应的遗物穿戴缓存 nRelicID = "..nRelicID.." i = "..i.." nHeroIndex = "..nHeroIndex.." nHeroID = "..nHeroID)
|
|
|
+ else
|
|
|
+ local nEquipRelicID = tHeroGrid.relic.relicID
|
|
|
+ print("[WinnerRelic_onLogin] 英雄当前穿戴 nEquipRelicID = "..nEquipRelicID.." nHeroID = "..nHeroID)
|
|
|
+ -- local nEquipRelicStar = tHeroGrid.relic.stars
|
|
|
+ if nEquipRelicID ~= nRelicID then
|
|
|
+ table.remove(tRelicData.equipped[nRelicID], i)
|
|
|
+ print("[WinnerRelic_onLogin] 圣遗物登录,英雄当前穿戴的遗物 和遗物记录的不一致, 进行移除 nRelicID = "..nRelicID.." nEquipRelicID = "..nEquipRelicID
|
|
|
+ .." nHeroIndex = "..nHeroIndex.." nHeroID = "..nHeroID)
|
|
|
+ end
|
|
|
end
|
|
|
end
|
|
|
+
|
|
|
+ print("[WinnerRelic_onLogin] 检查正常的遗物和穿戴的英雄 nRelicID = "..nRelicID.." i = "..i.." nHeroIndex = "..nHeroIndex.." nHeroID = "..nHeroID)
|
|
|
end
|
|
|
end
|
|
|
end
|