From 00dc369cb627d728c520cd597b31e9edf2c75eed Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Thu, 18 Nov 2021 10:47:18 +0100 Subject: [PATCH] =?UTF-8?q?fix(Scripts/UBRS):=20The=20Beast=20should=20dea?= =?UTF-8?q?ggro=20when=20walking=20over=20the=20fir=E2=80=A6=20(#9201)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Best should not use fireball and then fireblast at the same time. Fixes #9127 --- .../BlackrockSpire/boss_the_beast.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp index 1f9f80763..52bee00c2 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp @@ -86,6 +86,9 @@ private: Creature* _me; }; +// Used to make Hodir disengage whenever he leaves his room +constexpr static float FirewalPositionY = -505.f; + class boss_the_beast : public CreatureScript { public: @@ -184,6 +187,12 @@ public: return; } + if (me->GetPositionY() > FirewalPositionY) + { + EnterEvadeMode(); + return; + } + events.Update(diff); if (me->HasUnitState(UNIT_STATE_CASTING)) @@ -217,10 +226,18 @@ public: case EVENT_FIREBALL: DoCastVictim(SPELL_FIREBALL); events.ScheduleEvent(EVENT_FIREBALL, 8 * IN_MILLISECONDS, 21 * IN_MILLISECONDS); + if (events.GetNextEventTime(EVENT_FIREBLAST) < 3 * IN_MILLISECONDS) + { + events.RescheduleEvent(EVENT_FIREBLAST, 3 * IN_MILLISECONDS); + } break; case EVENT_FIREBLAST: DoCastVictim(SPELL_FIREBLAST); events.ScheduleEvent(EVENT_FIREBLAST, 5 * IN_MILLISECONDS, 8 * IN_MILLISECONDS); + if (events.GetNextEventTime(EVENT_FIREBALL) < 3 * IN_MILLISECONDS) + { + events.RescheduleEvent(EVENT_FIREBALL, 3 * IN_MILLISECONDS); + } break; }