Skip to content

Commit

Permalink
fix(Core/Spells): Fix Lay on Hands healing bypassing Cyclone (azeroth…
Browse files Browse the repository at this point in the history
…core#20552)

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

* and mana as well
  • Loading branch information
Nyeriah authored Nov 14, 2024
1 parent e2020e0 commit 7746287
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/server/game/Spells/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7746287

Please sign in to comment.