mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[0006] Fix most of movement opcodes. Thx Strawberry & Trinity for MovementStatusElements idea.
Signed-off-by: Yaki Khadafi <elsoldollo@gmail.com>
This commit is contained in:
parent
0e630a3639
commit
4409188546
14 changed files with 2540 additions and 176 deletions
|
|
@ -266,18 +266,15 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recv_data)
|
|||
}
|
||||
|
||||
/* extract packet */
|
||||
ObjectGuid guid;
|
||||
MovementInfo movementInfo;
|
||||
|
||||
recv_data >> guid.ReadAsPacked();
|
||||
recv_data >> movementInfo;
|
||||
/*----------------*/
|
||||
|
||||
if (!VerifyMovementInfo(movementInfo, guid))
|
||||
if (!VerifyMovementInfo(movementInfo, movementInfo.GetGuid()))
|
||||
return;
|
||||
|
||||
// fall damage generation (ignore in flight case that can be triggered also at lags in moment teleportation to another map).
|
||||
if (opcode == MSG_MOVE_FALL_LAND && plMover && !plMover->IsTaxiFlying())
|
||||
if (opcode == CMSG_MOVE_FALL_LAND && plMover && !plMover->IsTaxiFlying())
|
||||
plMover->HandleFall(movementInfo);
|
||||
|
||||
/* process position-change */
|
||||
|
|
@ -286,9 +283,8 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recv_data)
|
|||
if (plMover)
|
||||
plMover->UpdateFallInformationIfNeed(movementInfo, opcode);
|
||||
|
||||
WorldPacket data(opcode, recv_data.size());
|
||||
data << mover->GetPackGUID(); // write guid
|
||||
movementInfo.Write(data); // write data
|
||||
WorldPacket data(SMSG_PLAYER_MOVE, recv_data.size());
|
||||
data << movementInfo;
|
||||
mover->SendMessageToSetExcept(&data, _player);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue