fix(Scripts/MagtheridonsLair): prevent Hellfire Channelers from respawning during boss fight#25603
Conversation
…wning during boss fight
|
I'm not sure I'm seeing this one, the issue was that the boss resets/reenters combat switching from IN_COMBAT to NONE then IN_COMBAT again. Since the ads are registered as minions they would respawn when it changed to IN_COMBAT. I think the solution would rather be use formations to handle the respawn instead of the minion system and avoid the respawn measure in place |
|
Thanks for the feedback, @Nyeriah :) Formations make sense. In the case I ran into, it wasn’t really an oscillation, but rather the first transition to |
Changes Proposed:
This PR fixes a bug in Magtheridon's Lair where killing the 5 Hellfire Channelers in phase 1 caused them to respawn and rejoin the boss fight as soon as Magtheridon himself engaged the raid.
Root cause:
SetBossState(DATA_MAGTHERIDON, IN_PROGRESS)was triggered late in the encounter (when Magtheridon engaged), at which pointInstanceScript::UpdateMinionState()iterated over the registered minions (the Channelers) and calledRespawn()on every dead one. The boss script never excluded that path.Fix: transition the encounter to
IN_PROGRESSas soon as the first Channeler enters combat. By the time Magtheridon's ownJustEngagedWithruns, the state is alreadyIN_PROGRESSandUpdateMinionStatebecomes a no-op for the dead Channelers.Side benefit (intentional): room doors close and boss mods (DBM, etc.) are notified the moment a Channeler is engaged, rather than waiting for Magtheridon to attack a player. This matches the way the encounter behaves on retail.
Phase-1 wipe handling: since Magtheridon stays passive (immune to PC) until the last Channeler dies, his
BossAInever triggers_EnterEvadeMode. The instance script now resets the encounter toNOT_STARTEDwhen all Channelers have evaded; otherwise, after a phase-1 wipe, the room doors would stay locked. A new SmartAI hook onSMART_EVENT_EVADEfor entry 17256 sendsDATA_CHANNELER_COMBATwithdata=0to trigger the reset.This PR proposes changes to:
AI-assisted Pull Requests
I used Claude (Anthropic) to help analyze the AzerothCore source, identify the root cause, and draft the patch. I tested all scenarios in-game on a current master build (which already includes #25379) and I understand the changes I'm submitting.
Issues Addressed:
Related to #25375 (closed on 2026-04-05 by #25379). #25379 fixed the scheduler-vs-
UpdateVictimdeadlock inboss_magtheridon.cppso Magtheridon now becomes engageable properly, but it did not touch the Channeler-respawn flow described above — that flow is what this PR addresses.No open issue currently tracks the respawn bug. I'm happy to open one if a maintainer prefers having a dedicated issue reference.
SOURCE:
On retail/Classic, killing the Hellfire Channelers permanently removes them for the duration of the encounter — they never respawn during phase 2/3. Confirmed via Wowhead, player guides and video evidence.
Tests Performed:
I tested on a current master build (commit
295e45b0a, which includes #25379).How to Test the Changes:
Test scenarios
Normal kill — Enter Magtheridon's Lair, attack one of the Hellfire Channelers. Expect: doors close immediately, encounter is
IN_PROGRESS. Kill all 5 Channelers; wait for Magtheridon to be released; defeat him. Expect: no Channeler ever respawns during phase 2/3.Phase-1 wipe — Engage the Channelers, then wipe the raid. Expect: surviving Channelers evade and reset; once the last one is back home, the encounter resets to
NOT_STARTED, doors open, and the raid can re-enter.Phase-1 leave — Engage a Channeler, then have everyone leave the room (Feign Death / vanish / out of range). Expect: same as wipe — encounter resets when Channelers evade.
Phase 2/3 wipe — Kill all Channelers, engage Magtheridon, wipe. Expect: standard
BossAI::_EnterEvadeModereset; doors open. (Verifies the new code path doesn't interfere with the existing one.)Victory — Defeat Magtheridon. Expect: doors open, encounter state
DONE.Known Issues and TODO List: