Core/ObjectMgr: Static members are no longer accessed through singleton
--HG-- branch : trunk
This commit is contained in:
@@ -2402,7 +2402,7 @@ void InstanceMap::CreateInstanceData(bool load)
|
||||
if (i_data != NULL)
|
||||
return;
|
||||
|
||||
InstanceTemplate const* mInstance = sObjectMgr.GetInstanceTemplate(GetId());
|
||||
InstanceTemplate const* mInstance = ObjectMgr::GetInstanceTemplate(GetId());
|
||||
if (mInstance)
|
||||
{
|
||||
i_script_id = mInstance->script_id;
|
||||
|
||||
@@ -179,7 +179,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave *save,
|
||||
sLog.outError("CreateInstance: no entry for map %d", GetId());
|
||||
ASSERT(false);
|
||||
}
|
||||
const InstanceTemplate * iTemplate = sObjectMgr.GetInstanceTemplate(GetId());
|
||||
const InstanceTemplate * iTemplate = ObjectMgr::GetInstanceTemplate(GetId());
|
||||
if (!iTemplate)
|
||||
{
|
||||
sLog.outError("CreateInstance: no instance template for map %d", GetId());
|
||||
|
||||
@@ -163,7 +163,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
|
||||
if (!entry->IsDungeon())
|
||||
return true;
|
||||
|
||||
InstanceTemplate const* instance = sObjectMgr.GetInstanceTemplate(mapid);
|
||||
InstanceTemplate const* instance = ObjectMgr::GetInstanceTemplate(mapid);
|
||||
if (!instance)
|
||||
return false;
|
||||
|
||||
@@ -213,7 +213,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck)
|
||||
if (instance_map == mapid)
|
||||
break;
|
||||
|
||||
InstanceTemplate const* instance = sObjectMgr.GetInstanceTemplate(instance_map);
|
||||
InstanceTemplate const* instance = ObjectMgr::GetInstanceTemplate(instance_map);
|
||||
instance_map = instance ? instance->parent : 0;
|
||||
}
|
||||
while (instance_map);
|
||||
@@ -299,7 +299,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() || sObjectMgr.GetInstanceTemplate(mapid));
|
||||
return mEntry && (!mEntry->IsDungeon() || ObjectMgr::GetItemPrototype(mapid));
|
||||
// TODO: add check for battleground template
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user