Replace some MapManager::Instance().GetMap() calls with WorldObject::GetMap()

This commit is contained in:
hunuza 2008-11-16 12:11:45 +01:00
parent c37cfd0c2f
commit ac00eee418
23 changed files with 105 additions and 105 deletions

View file

@ -8740,7 +8740,7 @@ void Unit::SetVisibility(UnitVisibility x)
if(IsInWorld())
{
Map *m = MapManager::Instance().GetMap(GetMapId(), this);
Map *m = GetMap();
if(GetTypeId()==TYPEID_PLAYER)
m->PlayerRelocation((Player*)this,GetPositionX(),GetPositionY(),GetPositionZ(),GetOrientation());
@ -10493,8 +10493,8 @@ Unit* Unit::SelectNearbyTarget() const
TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyUnfriendlyUnitInObjectRangeCheck>, GridTypeMapContainer > grid_unit_searcher(searcher);
CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, world_unit_searcher, *MapManager::Instance().GetMap(GetMapId(), this));
cell_lock->Visit(cell_lock, grid_unit_searcher, *MapManager::Instance().GetMap(GetMapId(), this));
cell_lock->Visit(cell_lock, world_unit_searcher, *GetMap());
cell_lock->Visit(cell_lock, grid_unit_searcher, *GetMap());
}
// remove current target