mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
*Try to fix the bug that client get freezed when players teleported out of bg/arena.
--HG-- branch : trunk
This commit is contained in:
@@ -614,14 +614,14 @@ void Map::RelocationNotify()
|
||||
for(std::vector<uint64>::iterator iter = i_unitsToNotify.begin(); iter != i_unitsToNotify.end(); ++iter)
|
||||
{
|
||||
Unit *unit = ObjectAccessor::GetObjectInWorld(*iter, (Unit*)NULL);
|
||||
if(!unit)
|
||||
if(!unit || !unit->IsInWorld() || !unit->GetMapId() == GetId())
|
||||
{
|
||||
*iter = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
unit->m_Notified = true;
|
||||
|
||||
if(!unit->IsInWorld())
|
||||
continue;
|
||||
|
||||
if(unit->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Trinity::PlayerRelocationNotifier notifier(*((Player*)unit));
|
||||
|
||||
Reference in New Issue
Block a user