mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[10659] Fixed mistake in [10653] that causes player to fall from the transport at teleporting to another map
This commit is contained in:
parent
506e93d15d
commit
1370ead743
2 changed files with 11 additions and 8 deletions
|
|
@ -518,16 +518,19 @@ void WorldSession::HandleMoverRelocation(MovementInfo& movementInfo, Unit* mover
|
|||
|
||||
if (plMover)
|
||||
{
|
||||
if (movementInfo.HasMovementFlag(MOVEFLAG_ONTRANSPORT) && !plMover->m_transport)
|
||||
if (movementInfo.HasMovementFlag(MOVEFLAG_ONTRANSPORT))
|
||||
{
|
||||
// elevators also cause the client to send MOVEFLAG_ONTRANSPORT - just unmount if the guid can be found in the transport list
|
||||
for (MapManager::TransportSet::const_iterator iter = sMapMgr.m_Transports.begin(); iter != sMapMgr.m_Transports.end(); ++iter)
|
||||
if (!plMover->m_transport)
|
||||
{
|
||||
if ((*iter)->GetObjectGuid() == movementInfo.GetTransportGuid())
|
||||
// elevators also cause the client to send MOVEFLAG_ONTRANSPORT - just unmount if the guid can be found in the transport list
|
||||
for (MapManager::TransportSet::const_iterator iter = sMapMgr.m_Transports.begin(); iter != sMapMgr.m_Transports.end(); ++iter)
|
||||
{
|
||||
plMover->m_transport = (*iter);
|
||||
(*iter)->AddPassenger(plMover);
|
||||
break;
|
||||
if ((*iter)->GetObjectGuid() == movementInfo.GetTransportGuid())
|
||||
{
|
||||
plMover->m_transport = (*iter);
|
||||
(*iter)->AddPassenger(plMover);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue