fix(Core/Spells): Fix Lay on Hands healing bypassing Cyclone (#20552)

* fix(Core/Spells): Fix Lay on Hands healing bypassing Cyclone

* and mana as well
This commit is contained in:
Andrew
2024-11-14 03:37:23 -03:00
committed by GitHub
parent e2020e0886
commit 7746287ee1

View File

@@ -1885,6 +1885,12 @@ void Spell::EffectEnergize(SpellEffIndex effIndex)
if (!unitTarget->IsAlive())
return;
if (unitTarget->HasUnitState(UNIT_STATE_ISOLATED))
{
m_caster->SendSpellDamageImmune(unitTarget, GetSpellInfo()->Id);
return;
}
if (m_spellInfo->Effects[effIndex].MiscValue < 0 || m_spellInfo->Effects[effIndex].MiscValue >= int8(MAX_POWERS))
return;
@@ -3679,6 +3685,12 @@ void Spell::EffectHealMaxHealth(SpellEffIndex /*effIndex*/)
if (!unitTarget || !unitTarget->IsAlive())
return;
if (unitTarget->HasUnitState(UNIT_STATE_ISOLATED))
{
m_caster->SendSpellDamageImmune(unitTarget, GetSpellInfo()->Id);
return;
}
int32 addhealth = 0;
// damage == 0 - heal for caster max health