mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Implement vehicles created by player mounts.
Original idea by Elmaster, packet research by Wrong, ty. --HG-- branch : trunk
This commit is contained in:
@@ -358,6 +358,20 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
||||
plMover->SetPosition(movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
|
||||
plMover->UpdateFallInformationIfNeed(movementInfo, opcode);
|
||||
|
||||
// If on vehicle, update carried players
|
||||
if (Vehicle *vehicle=plMover->GetVehicleKit())
|
||||
{
|
||||
if (plMover->IsVehicle())
|
||||
{
|
||||
for (int i=0; i < 8; ++i)
|
||||
{
|
||||
if (Unit *passenger = vehicle->GetPassenger(i))
|
||||
if (passenger != NULL && passenger->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)passenger)->SetPosition(movementInfo.x, movementInfo.y, movementInfo.z, movementInfo.o);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (movementInfo.z < -500.0f)
|
||||
{
|
||||
if (plMover->InBattleGround()
|
||||
|
||||
Reference in New Issue
Block a user