From 7a66008429d8b7092afce87f5a126fff7e550323 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 10 Dec 2024 18:27:22 -0300 Subject: [PATCH] fix(Scripts/ZulAman): Dont update Hexlord timers while casting (#20876) --- .../scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index ec5ca7e77..d3ba8c88c 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -229,7 +229,13 @@ static PlayerAbilityStruct PlayerAbility[13][3] = struct boss_hexlord_malacrass : public BossAI { - boss_hexlord_malacrass(Creature* creature) : BossAI(creature, DATA_HEXLORD) { } + boss_hexlord_malacrass(Creature* creature) : BossAI(creature, DATA_HEXLORD) + { + scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); + } void Reset() override { @@ -238,10 +244,10 @@ struct boss_hexlord_malacrass : public BossAI _classAbilityTimer = 10000ms; SpawnAdds(); ScheduleHealthCheckEvent(80, [&] { - ScheduleTimedEvent(0s, [&] { + ScheduleTimedEvent(1s, [&] { DoCastSelf(SPELL_DRAIN_POWER, true); Talk(SAY_DRAIN_POWER); - }, 30s, 30s); + }, 30s); }); }