[8785] Use macro instead of explicit call to singleton Instance().

* For: ObjectAccessor, MapManager.
This commit is contained in:
XTZGZoReX 2009-11-08 03:45:26 +01:00
parent 6abf7e7f58
commit dc725ad6b8
28 changed files with 77 additions and 72 deletions

View file

@ -323,7 +323,7 @@ void Map::DeleteFromWorld(T* obj)
template<>
void Map::DeleteFromWorld(Player* pl)
{
ObjectAccessor::Instance().RemoveObject(pl);
objaccessor.RemoveObject(pl);
delete pl;
}
@ -411,7 +411,7 @@ bool Map::EnsureGridLoaded(const Cell &cell)
loader.LoadN();
// Add resurrectable corpses to world object list in grid
ObjectAccessor::Instance().AddCorpsesToGrid(GridPair(cell.GridX(),cell.GridY()),(*grid)(cell.CellX(), cell.CellY()), this);
objaccessor.AddCorpsesToGrid(GridPair(cell.GridX(),cell.GridY()),(*grid)(cell.CellX(), cell.CellY()), this);
setGridObjectDataLoaded(true,cell.GridX(), cell.GridY());
return true;
@ -2059,7 +2059,7 @@ void Map::SendInitSelf( Player * player )
void Map::SendInitTransports( Player * player )
{
// Hack to send out transports
MapManager::TransportMap& tmap = MapManager::Instance().m_TransportsByMap;
MapManager::TransportMap& tmap = mapmgr.m_TransportsByMap;
// no transports at map
if (tmap.find(player->GetMapId()) == tmap.end())
@ -2086,7 +2086,7 @@ void Map::SendInitTransports( Player * player )
void Map::SendRemoveTransports( Player * player )
{
// Hack to send out transports
MapManager::TransportMap& tmap = MapManager::Instance().m_TransportsByMap;
MapManager::TransportMap& tmap = mapmgr.m_TransportsByMap;
// no transports at map
if (tmap.find(player->GetMapId()) == tmap.end())