[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

@ -569,7 +569,7 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_INTERVAL_GRIDCLEAN] = MIN_GRID_DELAY;
}
if(reload)
MapManager::Instance().SetGridCleanUpDelay(m_configs[CONFIG_INTERVAL_GRIDCLEAN]);
mapmgr.SetGridCleanUpDelay(m_configs[CONFIG_INTERVAL_GRIDCLEAN]);
m_configs[CONFIG_INTERVAL_MAPUPDATE] = sConfig.GetIntDefault("MapUpdateInterval", 100);
if(m_configs[CONFIG_INTERVAL_MAPUPDATE] < MIN_MAP_UPDATE_DELAY)
@ -578,7 +578,7 @@ void World::LoadConfigSettings(bool reload)
m_configs[CONFIG_INTERVAL_MAPUPDATE] = MIN_MAP_UPDATE_DELAY;
}
if(reload)
MapManager::Instance().SetMapUpdateInterval(m_configs[CONFIG_INTERVAL_MAPUPDATE]);
mapmgr.SetMapUpdateInterval(m_configs[CONFIG_INTERVAL_MAPUPDATE]);
m_configs[CONFIG_INTERVAL_CHANGEWEATHER] = sConfig.GetIntDefault("ChangeWeatherInterval", 10 * MINUTE * IN_MILISECONDS);
@ -1489,7 +1489,7 @@ void World::SetInitialWorldSettings()
///- Initialize MapManager
sLog.outString( "Starting Map System" );
MapManager::Instance().Initialize();
mapmgr.Initialize();
///- Initialize Battlegrounds
sLog.outString( "Starting BattleGround System" );
@ -1498,7 +1498,7 @@ void World::SetInitialWorldSettings()
//Not sure if this can be moved up in the sequence (with static data loading) as it uses MapManager
sLog.outString( "Loading Transports..." );
MapManager::Instance().LoadTransports();
mapmgr.LoadTransports();
sLog.outString("Deleting expired bans..." );
loginDatabase.Execute("DELETE FROM ip_banned WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate");
@ -1643,7 +1643,7 @@ void World::Update(uint32 diff)
{
m_timers[WUPDATE_OBJECTS].Reset();
///- Update objects when the timer has passed (maps, transport, creatures,...)
MapManager::Instance().Update(diff); // As interval = 0
mapmgr.Update(diff); // As interval = 0
sBattleGroundMgr.Update(diff);
}
@ -1670,7 +1670,7 @@ void World::Update(uint32 diff)
/// </ul>
///- Move all creatures with "delayed move" and remove and delete all objects with "delayed remove"
MapManager::Instance().DoDelayedMovesAndRemoves();
mapmgr.DoDelayedMovesAndRemoves();
// update the instance reset times
sInstanceSaveManager.Update();