diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Map.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 0322a0258fb..afc9fea0ce1 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -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)); |