From b35c907cde030f4ce4ee9162d016ba93f05d94ff Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 22 Oct 2022 07:34:38 -0300 Subject: [PATCH] =?UTF-8?q?fix(Scripts/TempleOfAhnQiraj):=20Fix=20Cthun=20?= =?UTF-8?q?3-beam=20focus=20mechanic=20resett=E2=80=A6=20(#13479)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Scripts/TempleOfAhnQiraj): Fix Cthun 3-beam focus mechanic resetting after Dark Glare --- .../scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index d8740a99c..c5541a403 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -190,7 +190,7 @@ struct boss_eye_of_cthun : public BossAI void EnterCombat(Unit* who) override { - ScheduleTasks(); + ScheduleTasks(true); BossAI::EnterCombat(who); _beamTarget = who->GetGUID(); } @@ -231,12 +231,12 @@ struct boss_eye_of_cthun : public BossAI } } - void ScheduleTasks() + void ScheduleTasks(bool onEngage = false) { _scheduler. - Schedule(3s, [this](TaskContext task) + Schedule(3s, [this, onEngage](TaskContext task) { - if (task.GetRepeatCounter() < 3) + if (task.GetRepeatCounter() < 3 && onEngage) { if (Unit* target = ObjectAccessor::GetUnit(*me, _beamTarget)) {