Core/PacketIO: Restrict CMSG_STANDSTATECHANGE to only allow the same stand states that client can send by itself
Port From (https://github.com/TrinityCore/TrinityCore/commit/22987b705b150590f300240cd0309ac88bd902d5)
This commit is contained in:
@@ -2467,6 +2467,17 @@ namespace Game
|
||||
[WorldPacketHandler(ClientOpcodes.StandStateChange)]
|
||||
void HandleStandStateChange(StandStateChange packet)
|
||||
{
|
||||
switch (packet.StandState)
|
||||
{
|
||||
case UnitStandStateType.Stand:
|
||||
case UnitStandStateType.Sit:
|
||||
case UnitStandStateType.Sleep:
|
||||
case UnitStandStateType.Kneel:
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
GetPlayer().SetStandState(packet.StandState);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user