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.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/game/Map.cpp b/src/game/Map.cpp
index 2321e130301..b7612e56072 100644
--- a/src/game/Map.cpp
+++ b/src/game/Map.cpp
@@ -202,7 +202,7 @@ Map::Map(uint32 id, time_t expiry, uint32 InstanceId, uint8 SpawnMode, Map* _par
: i_mapEntry (sMapStore.LookupEntry(id)), i_spawnMode(SpawnMode), i_InstanceId(InstanceId), m_unloadTimer(0),
m_activeNonPlayersIter(m_activeNonPlayers.end()),
i_gridExpiry(expiry), m_parentMap(_parent ? _parent : this)
- , i_lock(true)
+ , i_lock(false)
{
m_notifyTimer.SetInterval(IN_MILISECONDS/2);
@@ -665,6 +665,8 @@ void Map::RemoveUnitFromNotify(Unit *unit, int32 slot)
assert(slot < i_unitsToNotify.size());
i_unitsToNotify[slot] = NULL;
}
+
+ unit->m_NotifyListPos = -1;
}
void Map::Update(const uint32 &t_diff)
@@ -816,17 +818,12 @@ void Map::Remove(Player *player, bool remove)
CellPair p = Trinity::ComputeCellPair(player->GetPositionX(), player->GetPositionY());
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP)
{
- if(remove)
- player->CleanupsBeforeDelete();
-
+ sLog.outCrash("Map::Remove: Player is in invalid cell!");
// invalid coordinates
player->RemoveFromWorld();
if( remove )
- {
- player->ResetMap();
DeleteFromWorld(player);
- }
return;
}
@@ -843,9 +840,6 @@ void Map::Remove(Player *player, bool remove)
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
assert(grid != NULL);
- if(remove)
- player->CleanupsBeforeDelete();
-
player->RemoveFromWorld();
RemoveFromGrid(player,grid,cell);