mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 11:25:42 +00:00
fix(Core/Movement): Implement order counters (#23015)
This commit is contained in:
@@ -949,12 +949,6 @@ void WorldSession::HandleNextCinematicCamera(WorldPacket& /*recv_data*/)
|
||||
GetPlayer()->GetCinematicMgr()->BeginCinematic();
|
||||
}
|
||||
|
||||
void WorldSession::HandleFeatherFallAck(WorldPacket& recv_data)
|
||||
{
|
||||
// no used
|
||||
recv_data.rfinish(); // prevent warnings spam
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetActionBarToggles(WorldPacket& recv_data)
|
||||
{
|
||||
uint8 ActionBar;
|
||||
@@ -1519,12 +1513,13 @@ void WorldSession::HandleCancelMountAuraOpcode(WorldPacket& /*recv_data*/)
|
||||
_player->RemoveAurasByType(SPELL_AURA_MOUNTED);
|
||||
}
|
||||
|
||||
void WorldSession::HandleMoveSetCanFlyAckOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleMoveFlagChangeOpcode(WorldPacket& recv_data)
|
||||
{
|
||||
// fly mode on/off
|
||||
LOG_DEBUG("network", "WORLD: CMSG_MOVE_SET_CAN_FLY_ACK");
|
||||
LOG_DEBUG("network", "WORLD: {}", GetOpcodeNameForLogging((Opcodes)recv_data.GetOpcode()));
|
||||
|
||||
ObjectGuid guid;
|
||||
uint32 counter;
|
||||
uint32 isApplied;
|
||||
recv_data >> guid.ReadAsPacked();
|
||||
|
||||
if (!_player)
|
||||
@@ -1533,17 +1528,42 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode(WorldPacket& recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
recv_data.read_skip<uint32>(); // unk
|
||||
recv_data >> counter;
|
||||
|
||||
MovementInfo movementInfo;
|
||||
movementInfo.guid = guid;
|
||||
ReadMovementInfo(recv_data, &movementInfo);
|
||||
|
||||
recv_data.read_skip<float>(); // unk2
|
||||
recv_data >> isApplied;
|
||||
|
||||
sScriptMgr->AnticheatSetCanFlybyServer(_player, movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY));
|
||||
|
||||
_player->m_mover->m_movementInfo.flags = movementInfo.GetMovementFlags();
|
||||
Unit* mover = _player->m_mover;
|
||||
Player* plrMover = mover->ToPlayer();
|
||||
|
||||
mover->m_movementInfo.flags = movementInfo.GetMovementFlags();
|
||||
|
||||
Opcodes response;
|
||||
|
||||
switch (recv_data.GetOpcode())
|
||||
{
|
||||
case CMSG_MOVE_HOVER_ACK: response = MSG_MOVE_HOVER; break;
|
||||
case CMSG_MOVE_FEATHER_FALL_ACK: response = MSG_MOVE_FEATHER_FALL; break;
|
||||
case CMSG_MOVE_WATER_WALK_ACK: response = MSG_MOVE_WATER_WALK; break;
|
||||
case CMSG_MOVE_SET_CAN_FLY_ACK: response = MSG_MOVE_UPDATE_CAN_FLY; break;
|
||||
default: return;
|
||||
}
|
||||
|
||||
if (!ProcessMovementInfo(movementInfo, mover, plrMover, recv_data))
|
||||
{
|
||||
recv_data.rfinish(); // prevent warnings spam
|
||||
return;
|
||||
}
|
||||
|
||||
WorldPacket data(response, 8);
|
||||
data << guid.WriteAsPacked();
|
||||
WriteMovementInfo(&data, &movementInfo);
|
||||
_player->m_mover->SendMessageToSet(&data, _player);
|
||||
}
|
||||
|
||||
void WorldSession::HandleRequestPetInfo(WorldPackets::Pet::RequestPetInfo& /*packet*/)
|
||||
|
||||
Reference in New Issue
Block a user