From 6ef16f18bbceba37399871981cffc3d3b475a174 Mon Sep 17 00:00:00 2001 From: ConorB <126167126+ConorB1745@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:43:57 +0200 Subject: [PATCH] fix(Script): Fix npc following player after starting duel (#20161) * fix(Script): Changed npc move script Death Knight Initiate (id: 28406) was not turning to face the player after they engaged a duel instead the npc followed the player wherever they went. Change was to remove script line for follow and replace with SetFacingToObject and specify the player as the object. Closes AzerothCore issue #20108 * fix(script): Fix npc following player whitespace issue Attempt to fix code styling fail on whtiespace * fix(script): Fix npc following player another whitespace issue Found more whitespace that was made by the fix to previous whitespace --- src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 5b8d272f6..b983b0b30 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -289,7 +289,7 @@ public: _duelInProgress = true; timer = 600000; // clear playerGUIDs after 10 minutes if no one initiates a duel - me->GetMotionMaster()->MoveFollow(caster, 2.0f, 0.0f); + me->SetFacingToObject(caster); events.ScheduleEvent(EVENT_SPEAK, 3s); events.ScheduleEvent(EVENT_SPEAK + 1, 7s);