mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[8789] Rename several singleton macros to use more consistent names.
* objmgr -> sObjectMgr * spellmgr -> sSpellMgr * WaypointMgr -> sWaypointMgr * poolhandler -> sPoolMgr * objaccessor -> sObjectAccessor * mapmgr -> sMapMgr * sInstanceSaveManager -> sInstanceSaveMgr * ticketmgr -> sTicketMgr * CreatureEAI_Mgr -> sEventAIMgr * auctionmgr -> sAuctionMgr * achievementmgr -> sAchievementMgr
This commit is contained in:
parent
539072fcbd
commit
0734adb746
84 changed files with 1113 additions and 1113 deletions
|
|
@ -323,7 +323,7 @@ void Map::DeleteFromWorld(T* obj)
|
|||
template<>
|
||||
void Map::DeleteFromWorld(Player* pl)
|
||||
{
|
||||
objaccessor.RemoveObject(pl);
|
||||
sObjectAccessor.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
|
||||
objaccessor.AddCorpsesToGrid(GridPair(cell.GridX(),cell.GridY()),(*grid)(cell.CellX(), cell.CellY()), this);
|
||||
sObjectAccessor.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 = mapmgr.m_TransportsByMap;
|
||||
MapManager::TransportMap& tmap = sMapMgr.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 = mapmgr.m_TransportsByMap;
|
||||
MapManager::TransportMap& tmap = sMapMgr.m_TransportsByMap;
|
||||
|
||||
// no transports at map
|
||||
if (tmap.find(player->GetMapId()) == tmap.end())
|
||||
|
|
@ -2359,11 +2359,11 @@ bool InstanceMap::Add(Player *player)
|
|||
if(IsDungeon())
|
||||
{
|
||||
// get or create an instance save for the map
|
||||
InstanceSave *mapSave = sInstanceSaveManager.GetInstanceSave(GetInstanceId());
|
||||
InstanceSave *mapSave = sInstanceSaveMgr.GetInstanceSave(GetInstanceId());
|
||||
if(!mapSave)
|
||||
{
|
||||
sLog.outDetail("InstanceMap::Add: creating instance save for map %d spawnmode %d with instance id %d", GetId(), GetSpawnMode(), GetInstanceId());
|
||||
mapSave = sInstanceSaveManager.AddInstanceSave(GetId(), GetInstanceId(), Difficulty(GetSpawnMode()), 0, true);
|
||||
mapSave = sInstanceSaveMgr.AddInstanceSave(GetId(), GetInstanceId(), Difficulty(GetSpawnMode()), 0, true);
|
||||
}
|
||||
|
||||
// check for existing instance binds
|
||||
|
|
@ -2493,7 +2493,7 @@ void InstanceMap::CreateInstanceData(bool load)
|
|||
const char* data = fields[0].GetString();
|
||||
if(data)
|
||||
{
|
||||
sLog.outDebug("Loading instance data for `%s` with id %u", objmgr.GetScriptName(i_script_id), i_InstanceId);
|
||||
sLog.outDebug("Loading instance data for `%s` with id %u", sObjectMgr.GetScriptName(i_script_id), i_InstanceId);
|
||||
i_data->Load(data);
|
||||
}
|
||||
delete result;
|
||||
|
|
@ -2501,7 +2501,7 @@ void InstanceMap::CreateInstanceData(bool load)
|
|||
}
|
||||
else
|
||||
{
|
||||
sLog.outDebug("New instance data, \"%s\" ,initialized!", objmgr.GetScriptName(i_script_id));
|
||||
sLog.outDebug("New instance data, \"%s\" ,initialized!", sObjectMgr.GetScriptName(i_script_id));
|
||||
i_data->Initialize();
|
||||
}
|
||||
}
|
||||
|
|
@ -2552,7 +2552,7 @@ void InstanceMap::PermBindAllPlayers(Player *player)
|
|||
if(!IsDungeon())
|
||||
return;
|
||||
|
||||
InstanceSave *save = sInstanceSaveManager.GetInstanceSave(GetInstanceId());
|
||||
InstanceSave *save = sInstanceSaveMgr.GetInstanceSave(GetInstanceId());
|
||||
if(!save)
|
||||
{
|
||||
sLog.outError("Cannot bind players, no instance save available for map!");
|
||||
|
|
@ -2594,7 +2594,7 @@ void InstanceMap::UnloadAll(bool pForce)
|
|||
}
|
||||
|
||||
if(m_resetAfterUnload == true)
|
||||
objmgr.DeleteRespawnTimeForInstance(GetInstanceId());
|
||||
sObjectMgr.DeleteRespawnTimeForInstance(GetInstanceId());
|
||||
|
||||
Map::UnloadAll(pForce);
|
||||
}
|
||||
|
|
@ -2612,9 +2612,9 @@ void InstanceMap::SetResetSchedule(bool on)
|
|||
// it is assumed that the reset time will rarely (if ever) change while the reset is scheduled
|
||||
if(IsDungeon() && !HavePlayers() && !IsRaid() && !IsHeroic())
|
||||
{
|
||||
InstanceSave *save = sInstanceSaveManager.GetInstanceSave(GetInstanceId());
|
||||
InstanceSave *save = sInstanceSaveMgr.GetInstanceSave(GetInstanceId());
|
||||
if(!save) sLog.outError("InstanceMap::SetResetSchedule: cannot turn schedule %s, no save available for instance %d of %d", on ? "on" : "off", GetInstanceId(), GetId());
|
||||
else sInstanceSaveManager.ScheduleReset(on, save->GetResetTime(), InstanceSaveManager::InstResetEvent(0, GetId(), GetInstanceId()));
|
||||
else sInstanceSaveMgr.ScheduleReset(on, save->GetResetTime(), InstanceSaveManager::InstResetEvent(0, GetId(), GetInstanceId()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue