From b03751a1326771b6eee80c5a3d75aadd3024c88b Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Sat, 10 Jul 2021 14:00:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E5=B0=BD=E5=89=AF=E6=9C=AC=E4=B9=9D?= =?UTF-8?q?=E5=85=83=E9=9C=B2=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit bbf89bbd3a64c7d4b83c5272ef9d0f35796f54ef) --- .../~Lua/Modules/Map/View/EndLessMapView.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua b/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua index 1cb5a6eeab..009e02663c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua @@ -128,7 +128,7 @@ function EndLessMapView:BindEvent() end MsgPanel.ShowTwo("是否消耗一枚九元露,复活所有神将并将血量恢复为100%?", function()end, function() NetManager.UseAddHpItemRequest(tostring(-1),function () - this.btnJiuYuanLuNum.text = (this.num - 1) + this:OnShow() PopupTipPanel.ShowTip("已将所有神将复活并恢复至满血!") end) end, "取消", "确认", "提示",false) @@ -316,6 +316,7 @@ function EndLessMapView:AddListener() Game.GlobalEvent:AddEvent(GameEvent.Map.EnergyFull, EndLessMapManager.EndlessRedCheck) Game.GlobalEvent:AddEvent(GameEvent.EndLess.MissonChange,this.RefreshTargetRoote) Game.GlobalEvent:AddEvent(GameEvent.EndLess.RefreshHeroData,this.OnShow) + Game.GlobalEvent:AddEvent(GameEvent.Bag.BagGold,this.RefreshItemNum) end function EndLessMapView:RemoveListener() @@ -324,9 +325,13 @@ function EndLessMapView:RemoveListener() Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold, this.GetBagEnergy) Game.GlobalEvent:RemoveEvent(GameEvent.Map.EnergyFull, EndLessMapManager.EndlessRedCheck) Game.GlobalEvent:RemoveEvent(GameEvent.EndLess.RefreshHeroData,this.OnShow) + Game.GlobalEvent:RemoveEvent(GameEvent.Bag.BagGold,this.RefreshItemNum) end - +function this.RefreshItemNum() + this.num = BagManager.GetItemCountById(EndLessMapManager.JiuYaunLuId) + this.btnJiuYuanLuNum.text = this.num +end function EndLessMapView:OnOpen() -- 初始化组件显示