From 326c711f6434b613e33e550ee29dacf7f72f5c0b Mon Sep 17 00:00:00 2001 From: Crow Date: Fri, 9 Oct 2026 13:06:27 -0500 Subject: [PATCH] fix(Scripts/BlackTemple): Fix Illidan's Demon Form and Shadowfiend DoTs during the Maiev and death scenes (#28031) Co-authored-by: Claude --- .../Outland/BlackTemple/boss_illidan.cpp | 37 ++++++++++++++++--- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 8a79fd4bb3..4ec9496ca1 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -231,7 +231,7 @@ struct boss_illidan_stormrage : public BossAI ScheduleHealthCheckEvent(30, [&] { // Maiev Spawn Scene scheduler.CancelAll(); - if (me->HasAura(SPELL_DEMON_FORM)) + if (IsInDemonFormOrTransforming()) DoAction(ACTION_ILLIDAN_DEMON_TRANSFORM_BACK); me->m_Events.CancelEventGroup(GROUP_DEMON_FORM); DoAction(ACTION_SHADOW_PRISON); @@ -378,7 +378,7 @@ struct boss_illidan_stormrage : public BossAI me->m_Events.CancelEventGroup(GROUP_DEMON_FORM); scheduler.CancelAll(); - if (me->HasAura(SPELL_DEMON_FORM)) + if (IsInDemonFormOrTransforming()) DoAction(ACTION_ILLIDAN_DEMON_TRANSFORM_BACK); _dying = true; @@ -588,7 +588,7 @@ struct boss_illidan_stormrage : public BossAI else ScheduleAbilities(PHASE_LANDING); DoResetThreatList(); - }, 60s); + }, 60s, GROUP_DEMON_FORM); } break; case PHASE_MAIEV: @@ -684,6 +684,13 @@ private: bool _inCutscene; uint8 beamPosId; + // Demon Form is only applied partway through the transform, so check the transform auras too + bool IsInDemonFormOrTransforming() const + { + return me->HasAnyAuras(SPELL_DEMON_TRANSFORM_1, SPELL_DEMON_TRANSFORM_2, SPELL_DEMON_TRANSFORM_3, + SPELL_DEMON_FORM); + } + void CycleBeamPos(uint8 &beamPosId) { uint8 newPos; @@ -1426,9 +1433,19 @@ class spell_illidan_parasitic_shadowfiend_aura : public AuraScript GetTarget()->CastSpell(GetTarget(), SPELL_SUMMON_PARASITIC_SHADOWFIENDS, true); } + void HandlePeriodic(AuraEffect const* /*aurEff*/) + { + // The DoT ignores immunities, but Shadow Prison should still stop its damage + if (GetTarget()->HasAura(SPELL_SHADOW_PRISON)) + PreventDefaultAction(); + } + void Register() override { - AfterEffectRemove += AuraEffectRemoveFn(spell_illidan_parasitic_shadowfiend_aura::HandleEffectRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); + AfterEffectRemove += AuraEffectRemoveFn(spell_illidan_parasitic_shadowfiend_aura::HandleEffectRemove, + EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); + OnEffectPeriodic += AuraEffectPeriodicFn(spell_illidan_parasitic_shadowfiend_aura::HandlePeriodic, + EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE); } }; @@ -1464,9 +1481,19 @@ class spell_illidan_parasitic_shadowfiend_trigger_aura : public AuraScript GetTarget()->CastSpell(GetTarget(), SPELL_SUMMON_PARASITIC_SHADOWFIENDS, true); } + void HandlePeriodic(AuraEffect const* /*aurEff*/) + { + // The DoT ignores immunities, but Shadow Prison should still stop its damage + if (GetTarget()->HasAura(SPELL_SHADOW_PRISON)) + PreventDefaultAction(); + } + void Register() override { - AfterEffectRemove += AuraEffectRemoveFn(spell_illidan_parasitic_shadowfiend_trigger_aura::HandleEffectRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); + AfterEffectRemove += AuraEffectRemoveFn(spell_illidan_parasitic_shadowfiend_trigger_aura::HandleEffectRemove, + EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); + OnEffectPeriodic += AuraEffectPeriodicFn(spell_illidan_parasitic_shadowfiend_trigger_aura::HandlePeriodic, + EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE); } };