mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Core/Transports: Fixed crash happening during teleporting transports
Closes #11793
This commit is contained in:
@@ -2506,15 +2506,9 @@ void Map::SendInitSelf(Player* player)
|
||||
|
||||
// build other passengers at transport also (they always visible and marked as visible and will not send at visibility update at add to map
|
||||
if (Transport* transport = player->GetTransport())
|
||||
{
|
||||
for (std::set<WorldObject*>::const_iterator itr = transport->GetPassengers().begin(); itr != transport->GetPassengers().end(); ++itr)
|
||||
{
|
||||
for (Transport::PassengerSet::const_iterator itr = transport->GetPassengers().begin(); itr != transport->GetPassengers().end(); ++itr)
|
||||
if (player != (*itr) && player->HaveAtClient(*itr))
|
||||
{
|
||||
(*itr)->BuildCreateUpdateBlockForPlayer(&data, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WorldPacket packet;
|
||||
data.BuildPacket(&packet);
|
||||
|
||||
Reference in New Issue
Block a user