diff --git a/Assets/ManagedResources/~Lua/Modules/Map/MapTrialManager.lua b/Assets/ManagedResources/~Lua/Modules/Map/MapTrialManager.lua index a58c830d9b..86aabff1be 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/MapTrialManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/MapTrialManager.lua @@ -296,7 +296,6 @@ function this.SetHeroHp(data,did,func) v.heroHp=data[1] end end - Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,true)--第二个false 已经进入副本了 不需要设置选择第一个Hero if func then func() end end diff --git a/Assets/ManagedResources/~Lua/Modules/Map/ShowEnemyInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/Map/ShowEnemyInfoPanel.lua index 3b6c3e18d2..1c816d54d8 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/ShowEnemyInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/ShowEnemyInfoPanel.lua @@ -99,7 +99,6 @@ function this:BindEvent() --更新精气值 LogGreen(Language[12222]..msg.essenceValue) MapTrialManager.powerValue = msg.essenceValue - Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false)--打完刷新血量 --召唤Boss if CarbonManager.difficulty == CARBON_TYPE.TRIAL and MapTrialManager.powerValue >= 100 then MapTrialManager.isHaveBoss = true @@ -109,6 +108,7 @@ function this:BindEvent() Timer.New(function() -- 刷新数据 CarbonManager.InitQuickFightData(monsterGroupId, nil, msg) + Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false)--打完刷新血量 end, 0.2):Start() end) self:ClosePanel() @@ -201,45 +201,6 @@ function this.SetSelectHero() Util.SetGray(item,value.heroHp<=0)--死啦 end - --刷新英雄选择面板时 检测血量 若有低于40%血量的英雄 给选择Hero加血 - --再遍历一次防止下面的return 打断上面for循环表现的正常赋值 - --这里只关于自动嗑药逻辑 - -- for k, v in ipairs(d) do - -- --若存在该设置参数并为已勾选状态 =1 否则=0 - -- local t=(PlayerPrefs.HasKey(PlayerManager.uid.."GeneralPopup_TrialSettingBtn"..2) - -- and PlayerPrefs.GetInt(PlayerManager.uid.."GeneralPopup_TrialSettingBtn"..2)==1) and 1 or 0 - -- if t==0 then return end - -- if MapTrialManager.selectHeroDid== v.heroId then - -- if v.heroHp<=0 then - -- PopupTipPanel.ShowTip(string.format(Language[11262],itemConfig[itemId].Name)) - -- return - -- end - -- end - -- --若血量小于自动回复百分比 并且 有血量 - -- if v.heroHp/100000 then - -- if (itemNum-MapManager.addHpCount)<=0 then - -- PopupTipPanel.ShowTip(string.format(Language[11263],itemConfig[itemId].Name)) - -- return - -- end - -- if BagManager.GetItemCountById(itemId)<=0 then - -- PopupTipPanel.ShowTip(string.format(Language[11264],itemConfig[itemId].Name,itemConfig[itemId].Name)) - -- return - -- end - -- NetManager.UseAddHpItemRequest(MapTrialManager.selectHeroDid,function() - -- local curHeroHp=0 - -- if v.heroId==MapTrialManager.selectHeroDid then - -- curHeroHp=v.heroHp - -- end - -- curHeroHp=curHeroHp+5000 --5000增加的血量也是要配表的 - -- if curHeroHp>=10000 then - -- curHeroHp=10000 - -- end - -- MapTrialManager.SetHeroHp({curHeroHp},MapTrialManager.selectHeroDid,function() - -- PopupTipPanel.ShowTip(string.format(Language[11265],itemConfig[itemId].Name)) - -- end) - -- end) - -- end - -- end end diff --git a/Assets/ManagedResources/~Lua/Modules/Mission/MissionManager.lua b/Assets/ManagedResources/~Lua/Modules/Mission/MissionManager.lua index 2ac9052941..2ba71d6e7d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Mission/MissionManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Mission/MissionManager.lua @@ -451,6 +451,7 @@ local funcList = { --事件点触发 function this.EventPointTrigger(eventId) + Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false) MyPCall(function () --Log("EventPointTrigger中得到的事件ID " .. eventId) if eventId == 0 or eventId < 0 then @@ -466,7 +467,6 @@ function this.EventPointTrigger(eventId) local showValues = string.split(EventPointConfig[eventId].ShowValues, "|") Game.GlobalEvent:DispatchEvent(GameEvent.Event.PointTrigger, showType, eventId, showValues, options) - Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false) -- 根据不同的显示类型执行方法 if funcList[showType] then funcList[showType](showType, eventId, showValues, options)