mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Replace some MapManager::Instance().GetMap() calls with WorldObject::GetMap()
This commit is contained in:
parent
c37cfd0c2f
commit
ac00eee418
23 changed files with 105 additions and 105 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue