summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan <83884799+elthehablo@users.noreply.github.com>2026-01-03 18:13:36 +0100
committerGitHub <noreply@github.com>2026-01-03 14:13:36 -0300
commit0e6c49a63df43586f2d48eb6e1888172623fb294 (patch)
tree34883d57590dba2ad84ae251d0713e20ed7e280e
parent724d35e3f2b621c238817469cdd24daf48f395e8 (diff)
fix(Scripts/Naxxramas): fix issues with safety dance and gate opening on dying (#24274)HEADmaster
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp32
-rw-r--r--src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp6
2 files changed, 26 insertions, 12 deletions
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
index e06c78c625..e4d642000d 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_heigan.cpp
@@ -59,7 +59,7 @@ float const heiganFastDanceFaceDirection = 2.40f;
struct boss_heigan : public BossAI
{
- boss_heigan(Creature* creature) : BossAI(creature, DATA_HEIGAN_BOSS) { }
+ boss_heigan(Creature* creature) : BossAI(creature, BOSS_HEIGAN) { }
void Reset() override
{
@@ -67,6 +67,7 @@ struct boss_heigan : public BossAI
_currentPhase = 0;
_currentSection = 3;
_moveRight = true;
+ _eruptionScheduler.CancelAll();
}
void KilledUnit(Unit* who) override
@@ -80,6 +81,7 @@ struct boss_heigan : public BossAI
void JustDied(Unit* killer) override
{
+ _eruptionScheduler.CancelAll();
BossAI::JustDied(killer);
Talk(EMOTE_DEATH);
}
@@ -97,18 +99,19 @@ struct boss_heigan : public BossAI
_currentSection = 3;
_currentPhase = phase;
scheduler.CancelAll();
+ _eruptionScheduler.CancelAll();
if (phase == PHASE_SLOW_DANCE)
{
me->CastStop();
me->SetReactState(REACT_AGGRESSIVE);
DoZoneInCombat();
ScheduleTimedEvent(12s, 15s, [&] {
- DoCastSelf(SPELL_ERUPTION);
+ DoCastSelf(SPELL_SPELL_DISRUPTION);
}, 10s);
ScheduleTimedEvent(17s, [&] {
DoCastSelf(SPELL_DECREPIT_FEVER);
}, 22s, 25s);
- ScheduleTimedEvent(15s, [&] {
+ _eruptionScheduler.Schedule(15s, [this](TaskContext context){
instance->SetData(DATA_HEIGAN_ERUPTION, _currentSection);
if (_currentSection == 3)
_moveRight = false;
@@ -117,8 +120,8 @@ struct boss_heigan : public BossAI
_moveRight ? _currentSection++ : _currentSection--;
Talk(SAY_TAUNT);
- }, 10s);
- scheduler.Schedule(90s, [this](TaskContext /*context*/) {
+ context.Repeat(10s);
+ }).Schedule(90s, [this](TaskContext /*context*/) {
StartFightPhase(PHASE_FAST_DANCE);
});
}
@@ -134,7 +137,7 @@ struct boss_heigan : public BossAI
scheduler.Schedule(1s, [this](TaskContext /*context*/) {
DoCastSelf(SPELL_PLAGUE_CLOUD);
});
- ScheduleTimedEvent(7s, [&] {
+ _eruptionScheduler.Schedule(7s, [this](TaskContext context){
instance->SetData(DATA_HEIGAN_ERUPTION, _currentSection);
if (_currentSection == 3)
_moveRight = false;
@@ -142,8 +145,8 @@ struct boss_heigan : public BossAI
_moveRight = true;
_moveRight ? _currentSection++ : _currentSection--;
- }, 4s);
- scheduler.Schedule(45s, [this](TaskContext /*context*/) {
+ context.Repeat(4s);
+ }).Schedule(45s, [this](TaskContext /*context*/) {
StartFightPhase(PHASE_SLOW_DANCE);
Talk(EMOTE_DANCE_END); // avoid play the emote on aggro
});
@@ -153,6 +156,18 @@ struct boss_heigan : public BossAI
}, 5s);
}
+ void UpdateAI(uint32 diff) override
+ {
+ if (!UpdateVictim())
+ {
+ return;
+ }
+
+ _eruptionScheduler.Update(diff);
+
+ BossAI::UpdateAI(diff);
+ }
+
void CheckSafetyDance()
{
if (Map* map = me->GetMap())
@@ -172,6 +187,7 @@ private:
uint8 _currentPhase{};
uint8 _currentSection{};
bool _moveRight{true};
+ TaskScheduler _eruptionScheduler;
};
void AddSC_boss_heigan()
diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp
index 59248784cf..9014646366 100644
--- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp
@@ -36,6 +36,7 @@ BossBoundaryData const boundaries =
/* Plague Quarter */
{ BOSS_NOTH, new RectangleBoundary(2618.0f, 2754.0f, -3557.43f, -3450.0f) },
{ BOSS_HEIGAN, new CircleBoundary(Position(2772.57f, -3685.28f), 56.0f) },
+ { BOSS_HEIGAN, new RectangleBoundary(2723.0f, 2826.0f, -3736.0f, -3641.0f) },
{ BOSS_LOATHEB, new CircleBoundary(Position(2909.0f, -3997.41f), 57.0f) },
/* Military Quarter */
@@ -55,10 +56,7 @@ BossBoundaryData const boundaries =
/* Frostwyrm Lair */
{ BOSS_SAPPHIRON, new CircleBoundary(Position(3517.627f, -5255.5f), 110.0) },
- { BOSS_KELTHUZAD, new CircleBoundary(Position(3716.0f, -5107.0f), 85.0) },
-
- /* Heigan */
- { DATA_HEIGAN_BOSS, new RectangleBoundary(2723.0f, 2826.0f, -3736.0f, -3641.0f) }
+ { BOSS_KELTHUZAD, new CircleBoundary(Position(3716.0f, -5107.0f), 85.0) }
};
struct LivingPoisonData