mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 08:17:56 +00:00
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:
@@ -1997,6 +1997,12 @@ void Spell::EffectEnergizePct(SpellEffIndex effIndex)
|
|||||||
if (!unitTarget->IsAlive())
|
if (!unitTarget->IsAlive())
|
||||||
return;
|
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))
|
if (m_spellInfo->Effects[effIndex].MiscValue < 0 || m_spellInfo->Effects[effIndex].MiscValue >= int8(MAX_POWERS))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user