* Some singleton renames for consistency:
accmgr -> AccountMgr objmgr -> ObjectMgr auctionmgr -> sAuctionMgr spellmgr -> sSpellMgr CreatureEAI_Mgr -> sEventAIMgr achievementmgr -> sAchievementMgr gameeventmgr -> sGameEventMgr sInstanceSaveManager -> sInstanceSaveMgr poolhandler -> sPoolMgr --HG-- branch : trunk
This commit is contained in:
@@ -2320,11 +2320,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
|
||||
@@ -2438,7 +2438,7 @@ void InstanceMap::CreateInstanceData(bool load)
|
||||
if (i_data != NULL)
|
||||
return;
|
||||
|
||||
InstanceTemplate const* mInstance = objmgr.GetInstanceTemplate(GetId());
|
||||
InstanceTemplate const* mInstance = sObjectMgr.GetInstanceTemplate(GetId());
|
||||
if (mInstance)
|
||||
{
|
||||
i_script_id = mInstance->script_id;
|
||||
@@ -2460,7 +2460,7 @@ void InstanceMap::CreateInstanceData(bool load)
|
||||
std::string 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.c_str());
|
||||
}
|
||||
}
|
||||
@@ -2511,7 +2511,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!");
|
||||
@@ -2545,7 +2545,7 @@ void InstanceMap::UnloadAll()
|
||||
ASSERT(!HavePlayers());
|
||||
|
||||
if (m_resetAfterUnload == true)
|
||||
objmgr.DeleteRespawnTimeForInstance(GetInstanceId());
|
||||
sObjectMgr.DeleteRespawnTimeForInstance(GetInstanceId());
|
||||
|
||||
Map::UnloadAll();
|
||||
}
|
||||
@@ -2563,9 +2563,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() && !IsRaidOrHeroicDungeon())
|
||||
{
|
||||
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(), Difficulty(GetSpawnMode()), GetInstanceId()));
|
||||
else sInstanceSaveMgr.ScheduleReset(on, save->GetResetTime(), InstanceSaveManager::InstResetEvent(0, GetId(), Difficulty(GetSpawnMode()), GetInstanceId()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3429,7 +3429,7 @@ void Map::ScriptsProcess()
|
||||
}
|
||||
else //check hashmap holders
|
||||
{
|
||||
if (CreatureData const* data = objmgr.GetCreatureData(step.script->datalong))
|
||||
if (CreatureData const* data = sObjectMgr.GetCreatureData(step.script->datalong))
|
||||
cTarget = ObjectAccessor::GetObjectInWorld<Creature>(data->mapid, data->posX, data->posY, MAKE_NEW_GUID(step.script->datalong, data->id, HIGHGUID_UNIT), cTarget);
|
||||
}
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave *save,
|
||||
sLog.outError("CreateInstance: no entry for map %d", GetId());
|
||||
ASSERT(false);
|
||||
}
|
||||
const InstanceTemplate * iTemplate = objmgr.GetInstanceTemplate(GetId());
|
||||
const InstanceTemplate * iTemplate = sObjectMgr.GetInstanceTemplate(GetId());
|
||||
if (!iTemplate)
|
||||
{
|
||||
sLog.outError("CreateInstance: no instance template for map %d", GetId());
|
||||
|
||||
@@ -164,7 +164,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
|
||||
if (!entry->IsDungeon())
|
||||
return true;
|
||||
|
||||
InstanceTemplate const* instance = objmgr.GetInstanceTemplate(mapid);
|
||||
InstanceTemplate const* instance = sObjectMgr.GetInstanceTemplate(mapid);
|
||||
if (!instance)
|
||||
return false;
|
||||
|
||||
@@ -214,7 +214,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
|
||||
if (instance_map == mapid)
|
||||
break;
|
||||
|
||||
InstanceTemplate const* instance = objmgr.GetInstanceTemplate(instance_map);
|
||||
InstanceTemplate const* instance = sObjectMgr.GetInstanceTemplate(instance_map);
|
||||
instance_map = instance ? instance->parent : 0;
|
||||
}
|
||||
while (instance_map);
|
||||
@@ -253,7 +253,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
|
||||
}
|
||||
|
||||
//Other requirements
|
||||
return player->Satisfy(objmgr.GetAccessRequirement(mapid, targetDifficulty), mapid, true);
|
||||
return player->Satisfy(sObjectMgr.GetAccessRequirement(mapid, targetDifficulty), mapid, true);
|
||||
}
|
||||
|
||||
void MapManager::Update(uint32 diff)
|
||||
@@ -300,7 +300,7 @@ bool MapManager::ExistMapAndVMap(uint32 mapid, float x,float y)
|
||||
bool MapManager::IsValidMAP(uint32 mapid)
|
||||
{
|
||||
MapEntry const* mEntry = sMapStore.LookupEntry(mapid);
|
||||
return mEntry && (!mEntry->IsDungeon() || objmgr.GetInstanceTemplate(mapid));
|
||||
return mEntry && (!mEntry->IsDungeon() || sObjectMgr.GetInstanceTemplate(mapid));
|
||||
// TODO: add check for battleground template
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user