From dd84a4bd3f0d4b8f02dc3994d72ff2333090e1f7 Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Sat, 20 Feb 2021 16:29:36 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=B8=BF=E8=92=99=E9=98=B5=E3=80=91?= =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E6=BF=80=E6=B4=BB=E9=B8=BF=E8=92=99?= =?UTF-8?q?=E7=A2=91=E7=9A=84=E6=97=B6=E5=80=99=20=E4=B8=A4=E4=B8=AA329=20?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E4=BD=8D=E7=BD=AE=20=E9=87=8D=E7=BD=AE1?= =?UTF-8?q?=E7=BA=A7=20=E9=94=99=E8=AF=AFbug=20=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Guide/GuideManager.lua | 19 ++++++++++--------- .../~Lua/Modules/Net/IndicationManager.lua | 15 ++++++++++++++- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua b/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua index 981e3fa213..eb9ad6a5b2 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua @@ -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 diff --git a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua index 2a1246d29f..e2d8e8dc67 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua @@ -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)