From 08b9c7d62528a9147266d084768b8a7fb0deb3e0 Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Tue, 25 Oct 2022 23:12:35 -0300 Subject: [PATCH] delay small claw tentacles autoattack by 2s --- .../Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index 30850705ab..ba968b1792 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -679,6 +679,8 @@ struct npc_claw_tentacle : public ScriptedAI } } } + + _canAttack = false; } void JustDied(Unit* /*killer*/) override @@ -705,10 +707,11 @@ struct npc_claw_tentacle : public ScriptedAI DoZoneInCombat(); _scheduler.Schedule(2s, [this](TaskContext context) - { - DoCastVictim(SPELL_HAMSTRING); - context.Repeat(5s); - }); + { + _canAttack = true; + DoCastVictim(SPELL_HAMSTRING); + context.Repeat(5s); + }); } void UpdateAI(uint32 diff) override @@ -719,12 +722,16 @@ struct npc_claw_tentacle : public ScriptedAI _scheduler.Update(diff); - DoMeleeAttackIfReady(); + if (_canAttack) + { + DoMeleeAttackIfReady(); + } } private: TaskScheduler _scheduler; ObjectGuid _portalGUID; + bool _canAttack; }; struct npc_giant_claw_tentacle : public ScriptedAI