Core/Vehicle: Don't set players movementInfo on vehicle dismiss
Port From (https://github.com/TrinityCore/TrinityCore/commit/c52737852d3d94a16f078741f7ccf3afe13eb603)
This commit is contained in:
@@ -12,14 +12,17 @@ namespace Game
|
|||||||
public partial class WorldSession
|
public partial class WorldSession
|
||||||
{
|
{
|
||||||
[WorldPacketHandler(ClientOpcodes.MoveDismissVehicle, Processing = PacketProcessing.ThreadSafe)]
|
[WorldPacketHandler(ClientOpcodes.MoveDismissVehicle, Processing = PacketProcessing.ThreadSafe)]
|
||||||
void HandleMoveDismissVehicle(MoveDismissVehicle packet)
|
void HandleMoveDismissVehicle(MoveDismissVehicle moveDismissVehicle)
|
||||||
{
|
{
|
||||||
ObjectGuid vehicleGUID = GetPlayer().GetCharmedGUID();
|
ObjectGuid vehicleGUID = GetPlayer().GetCharmedGUID();
|
||||||
if (vehicleGUID.IsEmpty()) // something wrong here...
|
if (vehicleGUID.IsEmpty()) // something wrong here...
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GetPlayer().ValidateMovementInfo(packet.Status);
|
if (moveDismissVehicle.Status.Guid != vehicleGUID)
|
||||||
GetPlayer().m_movementInfo = packet.Status;
|
{
|
||||||
|
Log.outError(LogFilter.Network, $"Player {GetPlayer().GetGUID()} tried to dismiss a controlled vehicle ({vehicleGUID}) that he has no control over. Possible cheater or malformed packet.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
GetPlayer().ExitVehicle();
|
GetPlayer().ExitVehicle();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user