From 68d69c35966fc96dd234b4f57c579aec2babc52a Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Thu, 19 Dec 2024 05:35:39 -0300 Subject: [PATCH] =?UTF-8?q?fix(Scripts/Spells):=20Fix=20Aether=20Ray=20beh?= =?UTF-8?q?aviour=20for=20quest=20Wrangle=20Aethe=E2=80=A6=20(#20972)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Scripts/Spells): Fix Aether Ray behaviour for quest Wrangle Aether Rays --- src/server/scripts/Spells/spell_quest.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 02f5105f0..a68e0bc52 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -37,12 +37,11 @@ class spell_q11065_wrangle_some_aether_rays : public SpellScript SpellCastResult CheckCast() { - // if thane is present and not in combat - allow cast if (Unit* target = GetExplTargetUnit()) if (target->GetHealthPct() < 40.0f) return SPELL_CAST_OK; - return SPELL_FAILED_CASTER_AURASTATE; + return SPELL_FAILED_BAD_TARGETS; } void Register() override @@ -77,6 +76,13 @@ class spell_q11065_wrangle_some_aether_rays_aura : public AuraScript void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { SetDuration(5000); + + if (GetTarget() && GetTarget()->ToCreature()) + if (Creature* ar = GetTarget()->ToCreature()) + { + ar->AttackStop(); + ar->SetReactState(REACT_PASSIVE); + } } void Register() override