Core/PacketIO: Restrict CMSG_STANDSTATECHANGE to only allow the same stand states that client can send by itself

This commit is contained in:
Shauren
2019-11-05 16:05:54 +01:00
committed by Ovahlord
parent ff018e4d75
commit 43a18dae7f

View File

@@ -530,10 +530,20 @@ void WorldSession::HandleSetSelectionOpcode(WorldPacket& recvData)
void WorldSession::HandleStandStateChangeOpcode(WorldPacket& recvData)
{
// TC_LOG_DEBUG("network", "WORLD: Received CMSG_STANDSTATECHANGE"); -- too many spam in log at lags/debug stop
uint32 animstate;
recvData >> animstate;
switch (animstate)
{
case UNIT_STAND_STATE_STAND:
case UNIT_STAND_STATE_SIT:
case UNIT_STAND_STATE_SLEEP:
case UNIT_STAND_STATE_KNEEL:
break;
default:
return;
}
_player->SetStandState(animstate);
}