【鸿蒙阵】第一次激活鸿蒙碑的时候 两个329 替换位置 重置1级 错误bug 修复

dev_chengFeng
zhangqiang 2021-02-20 16:29:36 +08:00
parent 80c175510e
commit dd84a4bd3f
2 changed files with 24 additions and 10 deletions

View File

@ -17,6 +17,7 @@ function this.Initialize()
Game.GlobalEvent:AddEvent(GameEvent.Player.OnLevelChange, this.OnLevelChange)
Game.GlobalEvent:AddEvent(GameEvent.HongMeng.HongMengGuide,this.HongMengGuideFun)
end
this.IsFirstOpenHarmonyBei = false
function this.HongMengGuideFun(OnOff)
--鸿蒙碑开启引导
print("鸿蒙碑开启引导")
@ -25,17 +26,17 @@ function this.HongMengGuideFun(OnOff)
UIManager.OpenPanel(UIName.MainPanel)
table.insert(_FuncGuideList, 101612)
this.CheckFuncGuide()
for i = 1, #HarmonyManager.hongmengGuards do
-- body
if HarmonyManager.hongmengGuards[i].heroId ~= "" then
-- body
local _heroData = HeroManager.GetSingleHeroData(HarmonyManager.hongmengGuards[i].heroId)
this.IsFirstOpenHarmonyBei = true
-- for i = 1, #HarmonyManager.hongmengGuards do
-- -- body
-- if HarmonyManager.hongmengGuards[i].heroId ~= "" then
-- -- body
-- local _heroData = HeroManager.GetSingleHeroData(HarmonyManager.hongmengGuards[i].heroId)
HeroManager.UpdateSingleHeroDatas(_heroData.dynamicId, 1, _heroData.star, 0, _heroData.upStarId)
-- HeroManager.UpdateSingleHeroDatas(_heroData.dynamicId, 1, _heroData.star, 0, _heroData.upStarId)
end
end
-- end
-- end
end
end

View File

@ -160,7 +160,20 @@ function this.HongMengIndication(buffer)
-- body UpdateHongMengDataHeroInfos
HarmonyManager.UpdateHongMengDataHeroInfos(msg.hongmengResonacnes)
end
if GuideManager.IsFirstOpenHarmonyBei then
GuideManager.IsFirstOpenHarmonyBei = false
for i = 1, #HarmonyManager.hongmengGuards do
-- body
if HarmonyManager.hongmengGuards[i].heroId ~= "" then
-- body
local _heroData = HeroManager.GetSingleHeroData(HarmonyManager.hongmengGuards[i].heroId)
HeroManager.UpdateSingleHeroDatas(_heroData.dynamicId, 1, _heroData.star, 0, _heroData.upStarId)
end
end
end
--鸿蒙数据有变化时更新英雄战力数据
for i = 1, #msg.hongmengGuards do
if msg.hongmengGuards[i].heroId~="" then
HeroManager.UpdateSingleHeroWarPower(msg.hongmengGuards[i].heroId)