mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[8785] Use macro instead of explicit call to singleton Instance().
* For: ObjectAccessor, MapManager.
This commit is contained in:
parent
6abf7e7f58
commit
dc725ad6b8
28 changed files with 77 additions and 72 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue