fix(Core/Spells): Block SPELL_EFFECT_ENERGIZE_PCT on isolated targets (#24844)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
blinkysc
2026-02-24 17:17:24 -06:00
committed by GitHub
parent 06d1656402
commit 30beeed2ae

View File

@@ -1997,6 +1997,12 @@ void Spell::EffectEnergizePct(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;