mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 16:43:47 +00:00
fix(Core/Unit): Fix dying from fall damage and incorrect flying on map teleport (#23465)
This commit is contained in:
@@ -1519,12 +1519,19 @@ void WorldSession::HandleMoveFlagChangeOpcode(WorldPacket& recv_data)
|
||||
|
||||
mover->m_movementInfo.flags = movementInfo.GetMovementFlags();
|
||||
|
||||
// old map - async processing, ignore
|
||||
if (counter <= _player->GetMapChangeOrderCounter())
|
||||
return;
|
||||
|
||||
if (!ProcessMovementInfo(movementInfo, mover, plrMover, recv_data))
|
||||
{
|
||||
recv_data.rfinish(); // prevent warnings spam
|
||||
return;
|
||||
}
|
||||
|
||||
if (_player->GetPendingFlightChange() == counter && opcode == CMSG_MOVE_SET_CAN_FLY_ACK)
|
||||
_player->SetPendingFlightChange(false);
|
||||
|
||||
Opcodes response;
|
||||
|
||||
switch (recv_data.GetOpcode())
|
||||
|
||||
@@ -105,6 +105,13 @@ void WorldSession::HandleMoveWorldportAck()
|
||||
GetPlayer()->UpdatePositionData();
|
||||
|
||||
GetPlayer()->SendInitialPacketsBeforeAddToMap();
|
||||
|
||||
if (GetPlayer()->GetPendingFlightChange() <= GetPlayer()->GetMapChangeOrderCounter())
|
||||
{
|
||||
if (!GetPlayer()->HasIncreaseMountedFlightSpeedAura() && !GetPlayer()->HasFlyAura())
|
||||
GetPlayer()->m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_CAN_FLY);
|
||||
}
|
||||
|
||||
if (!GetPlayer()->GetMap()->AddPlayerToMap(GetPlayer()))
|
||||
{
|
||||
LOG_ERROR("network.opcode", "WORLD: failed to teleport player {} ({}) to map {} because of unknown reason!",
|
||||
@@ -679,6 +686,10 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
// old map - async processing, ignore
|
||||
if (counter <= _player->GetMapChangeOrderCounter())
|
||||
return;
|
||||
|
||||
if (!ProcessMovementInfo(movementInfo, mover, _player, recvData))
|
||||
{
|
||||
recvData.rfinish(); // prevent warnings spam
|
||||
@@ -991,6 +1002,10 @@ void WorldSession::HandleMoveRootAck(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
// old map - async processing, ignore
|
||||
if (counter <= _player->GetMapChangeOrderCounter())
|
||||
return;
|
||||
|
||||
if (!ProcessMovementInfo(movementInfo, mover, _player, recvData))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user