From eab13037005ed05253c5f072f833f08c8374d800 Mon Sep 17 00:00:00 2001 From: Foereaper Date: Sat, 21 Sep 2024 02:18:58 +0200 Subject: [PATCH] Restore SetMovement method functionality --- methods/TrinityCore/PlayerMethods.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/methods/TrinityCore/PlayerMethods.h b/methods/TrinityCore/PlayerMethods.h index 9e4cb5d5ba..867187f489 100644 --- a/methods/TrinityCore/PlayerMethods.h +++ b/methods/TrinityCore/PlayerMethods.h @@ -10,6 +10,7 @@ #include "LuaValue.h" #include "NPCPackets.h" #include "PartyPackets.h" +#include "Unit.h" #include /*** @@ -1971,7 +1972,20 @@ namespace LuaPlayer { int32 pType = E->CHECKVAL(2); - player->SetMovement((PlayerMovementType)pType); + switch (pType) + { + case 1: // MOVE_ROOT + player->SetRooted(true); + case 2: // MOVE_UNROOT + player->SetRooted(false); + case 3: // MOVE_WATER_WALK + player->SetWaterWalking(true); + case 4: // MOVE_LAND_WALK + player->SetWaterWalking(false); + default: + return 0; + } + return 0; }