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:
hondacrx
2022-01-05 17:37:45 -05:00
parent efb7142aef
commit eb3036fae7
+11
View File
@@ -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);
}