Skip to content

Commit

Permalink
Restore SetMovement method functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Foereaper committed Sep 21, 2024
1 parent 71ddf6c commit eab1303
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion methods/TrinityCore/PlayerMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "LuaValue.h"
#include "NPCPackets.h"
#include "PartyPackets.h"
#include "Unit.h"
#include <boost/callable_traits/args.hpp>

/***
Expand Down Expand Up @@ -1971,7 +1972,20 @@ namespace LuaPlayer
{
int32 pType = E->CHECKVAL<int32>(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;
}

Expand Down

0 comments on commit eab1303

Please sign in to comment.