aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-16 11:46:03 -0600
committermegamage <none@none>2009-03-16 11:46:03 -0600
commitd6a1516057fdb8261ddee94f97d15a8b4f3de3c7 (patch)
treea04ed4e69fde8fe17281c3f2c128546cd2fd6f12 /src
parentabe53c5cb617a15dd5155ea7b383bc6b9618c4fa (diff)
*Try to fix the bug that client get freezed when players teleported out of bg/arena.
--HG-- branch : trunk
Diffstat (limited to 'src')
-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 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));