森罗回春散使用bug修改

ZhangBiao 2020-10-12 15:13:37 +08:00
parent 69fee1514f
commit 62f185c859
3 changed files with 2 additions and 42 deletions

View File

@ -296,7 +296,6 @@ function this.SetHeroHp(data,did,func)
v.heroHp=data[1] v.heroHp=data[1]
end end
end end
Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,true)--第二个false 已经进入副本了 不需要设置选择第一个Hero
if func then func() end if func then func() end
end end

View File

@ -99,7 +99,6 @@ function this:BindEvent()
--更新精气值 --更新精气值
LogGreen(Language[12222]..msg.essenceValue) LogGreen(Language[12222]..msg.essenceValue)
MapTrialManager.powerValue = msg.essenceValue MapTrialManager.powerValue = msg.essenceValue
Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false)--打完刷新血量
--召唤Boss --召唤Boss
if CarbonManager.difficulty == CARBON_TYPE.TRIAL and MapTrialManager.powerValue >= 100 then if CarbonManager.difficulty == CARBON_TYPE.TRIAL and MapTrialManager.powerValue >= 100 then
MapTrialManager.isHaveBoss = true MapTrialManager.isHaveBoss = true
@ -109,6 +108,7 @@ function this:BindEvent()
Timer.New(function() Timer.New(function()
-- 刷新数据 -- 刷新数据
CarbonManager.InitQuickFightData(monsterGroupId, nil, msg) CarbonManager.InitQuickFightData(monsterGroupId, nil, msg)
Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false)--打完刷新血量
end, 0.2):Start() end, 0.2):Start()
end) end)
self:ClosePanel() self:ClosePanel()
@ -201,45 +201,6 @@ function this.SetSelectHero()
Util.SetGray(item,value.heroHp<=0)--死啦 Util.SetGray(item,value.heroHp<=0)--死啦
end 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/10000<trialSetting[1].HealingPercent/10000 and v.heroHp>0 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 end

View File

@ -451,6 +451,7 @@ local funcList = {
--事件点触发 --事件点触发
function this.EventPointTrigger(eventId) function this.EventPointTrigger(eventId)
Game.GlobalEvent:DispatchEvent(GameEvent.Map.RefreshHeroHp,false,nil,false)
MyPCall(function () MyPCall(function ()
--Log("EventPointTrigger中得到的事件ID " .. eventId) --Log("EventPointTrigger中得到的事件ID " .. eventId)
if eventId == 0 or eventId < 0 then if eventId == 0 or eventId < 0 then
@ -466,7 +467,6 @@ function this.EventPointTrigger(eventId)
local showValues = string.split(EventPointConfig[eventId].ShowValues, "|") local showValues = string.split(EventPointConfig[eventId].ShowValues, "|")
Game.GlobalEvent:DispatchEvent(GameEvent.Event.PointTrigger, showType, eventId, showValues, options) 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) if funcList[showType] then funcList[showType](showType, eventId, showValues, options)