mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[8393] Fixed format CMSG_FORCE_MOVE_UNROOT_ACK and CMSG_FORCE_MOVE_ROOT_ACK.
Also avoid packet tail warnings spam at rejected movement packets.
This commit is contained in:
parent
055aa46a8f
commit
f45253ac8b
3 changed files with 46 additions and 61 deletions
|
|
@ -1025,76 +1025,50 @@ void WorldSession::HandleFeatherFallAck(WorldPacket &/*recv_data*/)
|
||||||
|
|
||||||
void WorldSession::HandleMoveUnRootAck(WorldPacket& recv_data)
|
void WorldSession::HandleMoveUnRootAck(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
|
// no used
|
||||||
|
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
||||||
|
/*
|
||||||
|
uint64 guid;
|
||||||
|
recv_data >> guid;
|
||||||
|
|
||||||
|
// now can skip not our packet
|
||||||
|
if(_player->GetGUID() != guid)
|
||||||
|
{
|
||||||
|
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
sLog.outDebug( "WORLD: CMSG_FORCE_MOVE_UNROOT_ACK" );
|
sLog.outDebug( "WORLD: CMSG_FORCE_MOVE_UNROOT_ACK" );
|
||||||
|
|
||||||
recv_data.read_skip<uint64>(); // guid
|
recv_data.read_skip<uint32>(); // unk
|
||||||
recv_data.read_skip<uint64>(); // unknown1
|
|
||||||
recv_data.read_skip<uint32>(); // unknown2
|
|
||||||
recv_data.read_skip<float>(); // PositionX
|
|
||||||
recv_data.read_skip<float>(); // PositionY
|
|
||||||
recv_data.read_skip<float>(); // PositionZ
|
|
||||||
recv_data.read_skip<float>(); // Orientation
|
|
||||||
|
|
||||||
/*
|
|
||||||
recv_data.hexlike();
|
|
||||||
|
|
||||||
recv_data >> guid;
|
MovementInfo movementInfo;
|
||||||
recv_data >> unknown1;
|
ReadMovementInfo(recv_data, &movementInfo);
|
||||||
recv_data >> unknown2;
|
*/
|
||||||
recv_data >> PositionX;
|
|
||||||
recv_data >> PositionY;
|
|
||||||
recv_data >> PositionZ;
|
|
||||||
recv_data >> Orientation;
|
|
||||||
|
|
||||||
// TODO for later may be we can use for anticheat
|
|
||||||
DEBUG_LOG("Guid " UI64FMTD,guid);
|
|
||||||
DEBUG_LOG("unknown1 " UI64FMTD,unknown1);
|
|
||||||
DEBUG_LOG("unknown2 %u",unknown2);
|
|
||||||
DEBUG_LOG("X %f",PositionX);
|
|
||||||
DEBUG_LOG("Y %f",PositionY);
|
|
||||||
DEBUG_LOG("Z %f",PositionZ);
|
|
||||||
DEBUG_LOG("O %f",Orientation);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleMoveRootAck(WorldPacket& recv_data)
|
void WorldSession::HandleMoveRootAck(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
recv_data.read_skip<uint64>(); // guid
|
// no used
|
||||||
recv_data.read_skip<uint64>(); // unknown1
|
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
||||||
recv_data.read_skip<uint32>(); // unknown2
|
/*
|
||||||
recv_data.read_skip<float>(); // PositionX
|
uint64 guid;
|
||||||
recv_data.read_skip<float>(); // PositionY
|
recv_data >> guid;
|
||||||
recv_data.read_skip<float>(); // PositionZ
|
|
||||||
recv_data.read_skip<float>(); // Orientation
|
|
||||||
|
|
||||||
/*
|
// now can skip not our packet
|
||||||
sLog.outDebug( "WORLD: CMSG_FORCE_MOVE_ROOT_ACK" );
|
if(_player->GetGUID() != guid)
|
||||||
recv_data.hexlike();
|
{
|
||||||
uint64 guid;
|
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
||||||
uint64 unknown1;
|
return;
|
||||||
uint32 unknown2;
|
}
|
||||||
float PositionX;
|
|
||||||
float PositionY;
|
|
||||||
float PositionZ;
|
|
||||||
float Orientation;
|
|
||||||
|
|
||||||
recv_data >> guid;
|
sLog.outDebug( "WORLD: CMSG_FORCE_MOVE_ROOT_ACK" );
|
||||||
recv_data >> unknown1;
|
|
||||||
recv_data >> unknown2;
|
|
||||||
recv_data >> PositionX;
|
|
||||||
recv_data >> PositionY;
|
|
||||||
recv_data >> PositionZ;
|
|
||||||
recv_data >> Orientation;
|
|
||||||
|
|
||||||
// for later may be we can use for anticheat
|
recv_data.read_skip<uint32>(); // unk
|
||||||
DEBUG_LOG("Guid " UI64FMTD,guid);
|
|
||||||
DEBUG_LOG("unknown1 " UI64FMTD,unknown1);
|
MovementInfo movementInfo;
|
||||||
DEBUG_LOG("unknown1 %u",unknown2);
|
ReadMovementInfo(recv_data, &movementInfo);
|
||||||
DEBUG_LOG("X %f",PositionX);
|
*/
|
||||||
DEBUG_LOG("Y %f",PositionY);
|
|
||||||
DEBUG_LOG("Z %f",PositionZ);
|
|
||||||
DEBUG_LOG("O %f",Orientation);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleSetActionBarToggles(WorldPacket& recv_data)
|
void WorldSession::HandleSetActionBarToggles(WorldPacket& recv_data)
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,10 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
||||||
|
|
||||||
// ignore, waiting processing in WorldSession::HandleMoveWorldportAckOpcode and WorldSession::HandleMoveTeleportAck
|
// ignore, waiting processing in WorldSession::HandleMoveWorldportAckOpcode and WorldSession::HandleMoveTeleportAck
|
||||||
if(plMover && plMover->IsBeingTeleported())
|
if(plMover && plMover->IsBeingTeleported())
|
||||||
|
{
|
||||||
|
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* extract packet */
|
/* extract packet */
|
||||||
MovementInfo movementInfo;
|
MovementInfo movementInfo;
|
||||||
|
|
@ -226,6 +229,7 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
sLog.outError("MovementHandler: player %s (guid %d, account %u) sent a packet (opcode %u) that is " SIZEFMTD " bytes larger than it should be. Kicked as cheater.", _player->GetName(), _player->GetGUIDLow(), _player->GetSession()->GetAccountId(), recv_data.GetOpcode(), recv_data.size() - recv_data.rpos());
|
sLog.outError("MovementHandler: player %s (guid %d, account %u) sent a packet (opcode %u) that is " SIZEFMTD " bytes larger than it should be. Kicked as cheater.", _player->GetName(), _player->GetGUIDLow(), _player->GetSession()->GetAccountId(), recv_data.GetOpcode(), recv_data.size() - recv_data.rpos());
|
||||||
KickPlayer();
|
KickPlayer();
|
||||||
|
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -350,7 +354,10 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data)
|
||||||
|
|
||||||
// now can skip not our packet
|
// now can skip not our packet
|
||||||
if(_player->GetGUID() != guid)
|
if(_player->GetGUID() != guid)
|
||||||
|
{
|
||||||
|
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// continue parse packet
|
// continue parse packet
|
||||||
|
|
||||||
|
|
@ -438,6 +445,7 @@ void WorldSession::HandleMoveNotActiveMover(WorldPacket &recv_data)
|
||||||
if(_player->m_mover->GetGUID() == old_mover_guid)
|
if(_player->m_mover->GetGUID() == old_mover_guid)
|
||||||
{
|
{
|
||||||
sLog.outError("HandleMoveNotActiveMover: incorrect mover guid: mover is " I64FMT " and should be " I64FMT " instead of " I64FMT, _player->m_mover->GetGUID(), _player->GetGUID(), old_mover_guid);
|
sLog.outError("HandleMoveNotActiveMover: incorrect mover guid: mover is " I64FMT " and should be " I64FMT " instead of " I64FMT, _player->m_mover->GetGUID(), _player->GetGUID(), old_mover_guid);
|
||||||
|
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -454,7 +462,10 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket &recv_data)
|
||||||
uint64 vehicleGUID = _player->GetCharmGUID();
|
uint64 vehicleGUID = _player->GetCharmGUID();
|
||||||
|
|
||||||
if(!vehicleGUID) // something wrong here...
|
if(!vehicleGUID) // something wrong here...
|
||||||
|
{
|
||||||
|
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MovementInfo mi;
|
MovementInfo mi;
|
||||||
ReadMovementInfo(recv_data, &mi);
|
ReadMovementInfo(recv_data, &mi);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8392"
|
#define REVISION_NR "8393"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue