回春散使用bug修复
parent
c72aa2bd21
commit
9942bd50bb
|
|
@ -632,8 +632,8 @@ function this.TrialChangeFloor(msg)
|
|||
-- end
|
||||
SwitchPanel.OpenPanel(UIName.MapPanel)
|
||||
MapTrialManager.isChangeLevel = false
|
||||
Log("换层前的层数:"..MapTrialManager.curTowerLevel)
|
||||
Log("要换到的层数:"..msg.curTower)
|
||||
-- Log("换层前的层数:"..MapTrialManager.curTowerLevel)
|
||||
-- Log("要换到的层数:"..msg.curTower)
|
||||
-- if MapTrialManager.curTowerLevel<10000 then
|
||||
-- MapTrialManager.curTowerLevel = MapTrialManager.curTowerLevel + 1
|
||||
-- end
|
||||
|
|
|
|||
|
|
@ -204,42 +204,42 @@ function this.SetSelectHero()
|
|||
--刷新英雄选择面板时 检测血量 若有低于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
|
||||
-- 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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -576,13 +576,13 @@ function this.SetSelectHero(isFirstIn,isFirstData,isMainIn)
|
|||
end
|
||||
end
|
||||
--若血量小于自动回复百分比 并且 有血量
|
||||
if v.heroHp/10000<trialSetting[1].HealingPercent/10000 and v.heroHp>0 then
|
||||
if v.heroHp/10000<trialSetting[1].HealingPercent/10000 and v.heroHp>0 and v.heroId == MapTrialManager.selectHeroDid then
|
||||
if (itemNum-MapManager.addHpCount)<=0 then
|
||||
PopupTipPanel.ShowTip(string.format(Language[11263],itemConfig[itemId].Name))
|
||||
-- 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))
|
||||
-- PopupTipPanel.ShowTip(string.format(Language[11264],itemConfig[itemId].Name,itemConfig[itemId].Name))
|
||||
return
|
||||
end
|
||||
NetManager.UseAddHpItemRequest(MapTrialManager.selectHeroDid,function()
|
||||
|
|
|
|||
Loading…
Reference in New Issue