From a25db7d09c571b9f1d25cb6c6bb63c8053b86604 Mon Sep 17 00:00:00 2001 From: guowei Date: Thu, 14 Jan 2021 14:09:13 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=B8=BF=E8=92=99=E9=98=B5bug?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Guide/GuideManager.lua | 12 ++++++++++++ .../~Lua/Modules/Harmony/Manager/HarmonyManager.lua | 2 +- .../Modules/Harmony/Panel/HongMengEnvoyPanel.lua | 5 ++++- .../Harmony/Panel/HongMengEnvoyUnloadPanel.lua | 1 + .../Modules/Harmony/Panel/HongMengUnLoadPanel.lua | 4 ++-- .../ManagedResources/~Lua/Modules/Hero/HeroData.lua | 2 ++ .../~Lua/Modules/Net/IndicationManager.lua | 1 + .../ManagedResources/~Lua/View/ScrollCycleView.lua | 2 +- 8 files changed, 24 insertions(+), 5 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua b/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua index b00f10faec..2f74fa8757 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua @@ -19,10 +19,22 @@ function this.Initialize() end function this.HongMengGuideFun(OnOff) --鸿蒙碑开启引导 + print("鸿蒙碑开启引导") if OnOff == 1 then -- body 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) + + HeroManager.UpdateSingleHeroDatas(_heroData.dynamicId, 1, _heroData.star, 0, _heroData.upStarId) + + end + end end end diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua index 664839c8a9..f3f518f9fa 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Manager/HarmonyManager.lua @@ -65,7 +65,7 @@ function this.UpdateHongMengDataGuards(hongmengGuards) if this.hongmengGuards[i].time ~= 0 then -- body this.hongmengGuards[i].time = this.hongmengGuards[i].time + GetTimeStamp() - print(this.hongmengGuards[i].value) + --print(this.hongmengGuards[i].value) end end diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyPanel.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyPanel.lua index 5cec67ae63..83664d6485 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyPanel.lua @@ -206,7 +206,7 @@ function HongMengEnvoyPanel:UpdateShow(list) for i = 1, #list do -- bodys - LogBlue("执行刷新"..list[i].heroId) + --LogBlue("执行刷新"..list[i].heroId) self.EnvoyItemList[i]:SetItemData(list[i]) self.EnvoyItemList[i]:SetItem(self.EnvoyItemList[i].gameObject, list[i]) end @@ -247,6 +247,7 @@ function HongMengEnvoyPanel:ReFeshTextFun(data) self.NumText.text = string.format("%d/%d", HeroCount, Box) end + --添加事件监听(用于子类重写) function HongMengEnvoyPanel:AddListener() for i = 1, #self.contents do @@ -255,6 +256,7 @@ function HongMengEnvoyPanel:AddListener() Game.GlobalEvent:AddEvent(GameEvent.HongMeng.UnLoadHongMengEnvoy, self.UpdateFun, self) Game.GlobalEvent:AddEvent(GameEvent.HongMeng.OnlyRefeshText, self.ReFeshTextFun, self) Game.GlobalEvent:AddEvent(GameEvent.HongMeng.UpHongMengEnvoy, self.UpdateFun, self) + end --移除事件监听(用于子类重写) @@ -265,6 +267,7 @@ function HongMengEnvoyPanel:RemoveListener() Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.UnLoadHongMengEnvoy, self.UpdateFun, self) Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.OnlyRefeshText, self.ReFeshTextFun, self) Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.UpHongMengEnvoy, self.UpdateFun, self) + end --界面打开时调用(用于子类重写) diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyUnloadPanel.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyUnloadPanel.lua index 01b4475d4e..8423b836b2 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyUnloadPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyUnloadPanel.lua @@ -41,6 +41,7 @@ function HongMengUnLoadPanel:BindEvent() Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.UnLoadHongMengEnvoy,self.data) -- HarmonyManager:RemoveGongMingList(select) + -- self:ClosePanel() end) end) diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengUnLoadPanel.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengUnLoadPanel.lua index 74d1d768d4..3eeef01253 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengUnLoadPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengUnLoadPanel.lua @@ -230,8 +230,8 @@ function HongMengUnLoadPanel:SetText(go,_data) else -- print(data[i].value) if _data.star >= 6 then - if dataAdditon[i].value > 0 then - + if dataAdditon[i].value > 0 and _data.talismanList < dataAdditon[i].value then + Util.GetGameObject(go.transform,"TextFa"):GetComponent("Text").text = string.format("%d",dataAdditon[i].value) else if _data.talismanList >= dataAdditon[i].value then diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroData.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroData.lua index 8348e62ef1..828662568f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroData.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroData.lua @@ -122,6 +122,7 @@ end HeroData.__set__.breakId = function (self,value) -- body self._breakId = value + print("self._breakId",self._breakId) end HeroData.__get__.breakId = function (self) @@ -161,6 +162,7 @@ HeroData.__get__.breakId = function (self) --print("self._id 222"..self._id) return endbreakIdLv else + return self._breakId end diff --git a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua index f923ed970b..9786b75bd5 100644 --- a/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Net/IndicationManager.lua @@ -128,6 +128,7 @@ function this.OpenHongMengTowerGuideIndication(buffer) local msg = HeroInfoProto_pb.HongmengSteleNewHandIndication() msg:ParseFromString(data) LogGreen(msg.state) + Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.HongMengGuide,msg.state) end function this.HongMengIndication(buffer) diff --git a/Assets/ManagedResources/~Lua/View/ScrollCycleView.lua b/Assets/ManagedResources/~Lua/View/ScrollCycleView.lua index 422e9894e2..c55fb78b67 100644 --- a/Assets/ManagedResources/~Lua/View/ScrollCycleView.lua +++ b/Assets/ManagedResources/~Lua/View/ScrollCycleView.lua @@ -59,7 +59,7 @@ local function ItemListOffset(self, offset) if curRound > 0 then newIndex = 1 - self.itemCount * (curRound - 1) + self.dataLine - i i = self.itemCount - i + 1 - print(j, i) + --print(j, i) go = self.cellItemList[j][i] go.tran.anchoredPosition = go.tran.anchoredPosition - self.offsetV2 * curRound SetUpdate(self, j + (newIndex - 1) * self.fixedCount, go)