From ba01bec5b3b82d0c613b0d12cd64fc4371bc1d15 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Tue, 30 Jan 2024 10:27:24 +0100 Subject: [PATCH] fix(Scripts/SSC): make sure Vashj faces the random people when doing Forked Lightning (#18232) initial --- .../CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index 6c05036ed6b6d2..fb0061340aaca9 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -86,6 +86,7 @@ struct boss_lady_vashj : public BossAI _count = 0; _recentlySpoken = false; _batTimer = 20s; + _playerAngle = 0.0f; BossAI::Reset(); ScheduleHealthCheckEvent(70, [&]{ @@ -180,7 +181,12 @@ struct boss_lady_vashj : public BossAI scheduler.CancelAll(); scheduler.Schedule(2400ms, [this](TaskContext context) { - DoCastRandomTarget(SPELL_FORKED_LIGHTNING); + if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0)) + { + _playerAngle = me->GetAngle(target); + me->SetOrientation(_playerAngle); + DoCast(target, SPELL_FORKED_LIGHTNING); + } context.Repeat(2400ms, 12450ms); }).Schedule(0s, [this](TaskContext context) { @@ -258,6 +264,7 @@ struct boss_lady_vashj : public BossAI } private: + float _playerAngle; bool _recentlySpoken; bool _intro; int32 _count;