aboutsummaryrefslogtreecommitdiff
path: root/src/game/Map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Map.cpp')
-rw-r--r--src/game/Map.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp
index 4866ecb540f..1d6b96a5cd9 100644
--- a/src/game/Map.cpp
+++ b/src/game/Map.cpp
@@ -594,14 +594,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));