Core/Transports: ported transport refactoring
* this implements full support for stoppable transports as well as serverside transport position tracking * fixed several vehicle related issues * fixed gameobject passengers not being displayed as transport passengers * pets, dynamic objects and other summons are not added as transport passengers and will now properly be displayed Todo: - Deeprun Tram visual issues needs to be resolved - Lady Deathwhisper's elevator needs some additional research
This commit is contained in:
1 parent
d8bf3a3170
commit
5229a734dd
49 files changed
+1381
-602
No files matched your search
@@ -88,10 +88,14 @@ void WorldSession::HandleMoveWorldportAckOpcode()
|
||||
return;
|
||||
}
|
||||
|
||||
float x = loc.GetPositionX();
|
||||
float y = loc.GetPositionY();
|
||||
float z = loc.GetPositionZ();
|
||||
float o = loc.GetOrientation();
|
||||
|
||||
if (GetPlayer()->HasUnitMovementFlag(MOVEMENTFLAG_HOVER))
|
||||
z += GetPlayer()->GetFloatValue(UNIT_FIELD_HOVERHEIGHT);
|
||||
GetPlayer()->Relocate(loc.GetPositionX(), loc.GetPositionY(), z, loc.GetOrientation());
|
||||
GetPlayer()->Relocate(x, y, z, o);
|
||||
GetPlayer()->SetFallInformation(0, GetPlayer()->GetPositionZ());
|
||||
|
||||
GetPlayer()->ResetMap();
|
||||
@@ -108,6 +112,16 @@ void WorldSession::HandleMoveWorldportAckOpcode()
|
||||
return;
|
||||
}
|
||||
|
||||
if (Transport* transport = _player->GetTeleportTransport())
|
||||
{
|
||||
transport->CalculatePassengerOffset(x, y, z, &o);
|
||||
_player->m_movementInfo.transport.pos.Relocate(x, y, z, o);
|
||||
|
||||
transport->AddPassenger(_player);
|
||||
|
||||
_player->ResetTeleportTransport();
|
||||
}
|
||||
|
||||
// battleground state prepare (in case join to BG), at relogin/tele player not invited
|
||||
// only add to bg group and object, if the player was invited (else he entered through command)
|
||||
if (_player->InBattleground())
|
||||
@@ -354,11 +368,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvPacket)
|
||||
}
|
||||
|
||||
if (!mover->GetTransport() && !mover->GetVehicle())
|
||||
{
|
||||
GameObject* go = mover->GetMap()->GetGameObject(movementInfo.transport.guid);
|
||||
if (!go || go->GetGoType() != GAMEOBJECT_TYPE_TRANSPORT)
|
||||
movementInfo.transport.guid.Clear();
|
||||
}
|
||||
movementInfo.transport.Reset();
|
||||
}
|
||||
else if (plrMover && plrMover->GetTransport()) // if we were on a transport, leave
|
||||
plrMover->m_transport->RemovePassenger(plrMover);
|
||||
|
||||
Reference in new issue
Block a user