aboutsummaryrefslogtreecommitdiff
path: root/src/game/Map.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-27 09:11:24 -0600
committermegamage <none@none>2009-03-27 09:11:24 -0600
commitdbf005236f6c1e2c85eee4e77d4eb01c82731d94 (patch)
tree07745d4933f0695b565f33d2946d577b7e56f735 /src/game/Map.cpp
parente9bdfa4d02cc5b88e26270290d1f8ad7785d5f17 (diff)
parent6a0677fd03861ca11c619593df05abd07cda25af (diff)
*Merge.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Map.cpp')
-rw-r--r--src/game/Map.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp
index b82c4127d94..0d31be8aa98 100644
--- a/src/game/Map.cpp
+++ b/src/game/Map.cpp
@@ -451,6 +451,7 @@ bool Map::Add(Player *player)
player->m_IsInNotifyList = false;
player->m_Notified = false;
+ player->m_clientGUIDs.clear();
AddNotifier(player);
return true;
@@ -596,24 +597,12 @@ 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 || unit->GetMapId() != GetId())
+ if(!unit || !unit->IsInWorld() || unit->GetMapId() != GetId())
{
*iter = 0;
continue;
}
- if(!unit->IsInWorld())
- {
- //other objs are done during remove
- if(unit->GetTypeId() == TYPEID_PLAYER)
- {
- Trinity::VisibleChangesNotifier notifier(*unit);
- VisitWorld(unit->GetPositionX(), unit->GetPositionY(), World::GetMaxVisibleDistance(), notifier);
- }
- *iter = 0;
- continue;
- }
-
unit->m_Notified = true;
if(unit->GetTypeId() == TYPEID_PLAYER)
@@ -772,8 +761,6 @@ void Map::Update(const uint32 &t_diff)
void Map::Remove(Player *player, bool remove)
{
- AddUnitToNotify(player);
-
// this may be called during Map::Update
// after decrement+unlink, ++m_mapRefIter will continue correctly
// when the first element of the list is being removed
@@ -810,6 +797,7 @@ void Map::Remove(Player *player, bool remove)
RemoveFromGrid(player,grid,cell);
SendRemoveTransports(player);
+ UpdateObjectVisibility(player,cell,p);
if( remove )
DeleteFromWorld(player);