Fixed Spirit Shell overhealing

This commit is contained in:
Tercio Jose
2021-03-11 18:54:48 -03:00
parent 4c50ae9c6e
commit 8736751d59
+9 -23
View File
@@ -1608,19 +1608,6 @@
--> HEALING serach key: ~healing |
-----------------------------------------------------------------------------------------------------------------------------------------
local gotit = {
[140468]=true, --Flameglow Mage
[122470]=true, --touch of karma Monk
[114556]=true, --purgatory DK
[152280]=true, --defile DK
[20711]=true, --spirit of redeption priest
[155783]=true, --Primal Tenacity Druid
[135597]=true, --Tooth and Claw Druid
[152261]=true, --Holy Shield Paladin
[158708]=true, --Earthen Barrier boss?
}
local ignored_shields = {
[142862] = true, -- Ancient Barrier (Malkorok)
[114556] = true, -- Purgatory (DK)
@@ -1629,7 +1616,7 @@
[184553] = true, --Soul Capacitor
}
local ignored_overheal = {
local ignored_overheal = { --during refresh, some shield does not replace the old value for the new one
[47753] = true, -- Divine Aegis
[86273] = true, -- Illuminated Healing
[114908] = true, --Spirit Shell
@@ -1716,7 +1703,6 @@
end
function parser:heal_absorb (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, spellschool, owner_serial, owner_name, owner_flags, owner_flags2, shieldid, shieldname, shieldtype, amount)
--[[statistics]]-- _detalhes.statistics.absorbs_calls = _detalhes.statistics.absorbs_calls + 1
if (_type(shieldname) == "boolean") then
@@ -1741,7 +1727,6 @@
if (shields_by_spell) then
local owner_shield = shields_by_spell [owner_name]
if (owner_shield) then
--print ("amt: ", owner_shield, owner_shield - amount, amount)
shields_by_spell [owner_name] = owner_shield - amount
end
end
@@ -2166,7 +2151,7 @@ SPELL_HEAL,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,Player-3209-065BAED
else
escudo [alvo_name] [spellid] [who_name] = amount
end
end
end
------------------------------------------------------------------------------------------------
--> recording debuffs applied by player
@@ -2184,7 +2169,7 @@ SPELL_HEAL,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,Player-3209-065BAED
--3/11 14:08:35.690 SPELL_AURA_APPLIED,Player-3676-06D63197,"Clutchdaily-Area52",0x512,0x0,Creature-0-4220-2287-20503-174175-0000CA4BDB,"Loyal Stoneborn",0xa48,0x0,342171,"Loyal Stoneborn",0x20,DEBUFF
--tag the target of this spell as a pet of caster
_detalhes.tabela_pets:Adicionar(alvo_serial, alvo_name, alvo_flags, who_serial, who_name, 0x00000417)
print("D! player", who_name, "tamed a gargoyle in HOA.")
--print("D! player", who_name, "tamed a gargoyle in HOA.")
end
------------------------------------------------------------------------------------------------
@@ -2399,9 +2384,7 @@ SPELL_HEAL,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,Player-3209-065BAED
------------------------------------------------------------------------------------------------
--> healing done (shields)
if (absorb_spell_list [spellid] and _recording_healing and amount) then
if (escudo [alvo_name] and escudo [alvo_name][spellid] and escudo [alvo_name][spellid][who_name]) then
if (ignored_overheal [spellid]) then
escudo [alvo_name][spellid][who_name] = amount -- refresh j vem o valor atualizado
return
@@ -2551,16 +2534,19 @@ SPELL_HEAL,Player-3209-0A79112C,"Symantec-Azralon",0x511,0x0,Player-3209-065BAED
------------------------------------------------------------------------------------------------
--> healing done (shields)
if (absorb_spell_list [spellid] and _recording_healing) then
local spellName = GetSpellInfo(spellid)
if (escudo [alvo_name] and escudo [alvo_name][spellid] and escudo [alvo_name][spellid][who_name]) then
if (amount) then
-- o amount o que sobrou do escudo
local overheal = escudo [alvo_name][spellid][who_name]
--local overheal = escudo [alvo_name][spellid][who_name] --usando o 'amount' passado pela função
--overheal não esta dando refresh quando um valor é adicionado ao escudo
escudo [alvo_name][spellid][who_name] = 0
--> can't use monk guard since its overheal is computed inside the unbuff
if (overheal and overheal > 0 and spellid ~= SPELLID_MONK_GUARD) then
if (amount > 0 and spellid ~= SPELLID_MONK_GUARD) then
--> removing the nil at the end before true for is_shield, I have no documentation change about it, not sure the reason why it was addded
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, nil, 0, _math_ceil (overheal), 0, 0, true) --0, 0, nil, true
return parser:heal (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, alvo_flags2, spellid, spellname, nil, 0, _math_ceil (amount), 0, 0, true) --0, 0, nil, true
else
return
end