[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

@ -168,7 +168,7 @@ void InstanceSave::SaveToDB()
// save instance data too
std::string data;
Map *map = MapManager::Instance().FindMap(GetMapId(),m_instanceid);
Map *map = mapmgr.FindMap(GetMapId(),m_instanceid);
if(map)
{
assert(map->IsDungeon());
@ -567,7 +567,7 @@ void InstanceSaveManager::_ResetSave(InstanceSaveHashMap::iterator &itr)
void InstanceSaveManager::_ResetInstance(uint32 mapid, uint32 instanceId)
{
sLog.outDebug("InstanceSaveMgr::_ResetInstance %u, %u", mapid, instanceId);
Map *map = (MapInstanced*)MapManager::Instance().CreateBaseMap(mapid);
Map *map = (MapInstanced*)mapmgr.CreateBaseMap(mapid);
if(!map->Instanceable())
return;
@ -584,7 +584,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, bool warn, uint32 timeLe
{
// global reset for all instances of the given map
// note: this isn't fast but it's meant to be executed very rarely
Map const *map = MapManager::Instance().CreateBaseMap(mapid);
Map const *map = mapmgr.CreateBaseMap(mapid);
if(!map->Instanceable())
return;
uint64 now = (uint64)time(NULL);