Core/ObjectMgr: Refactor sGOStorage

This commit is contained in:
leak committed 2011-04-28 22:54:30 +02:00
1 parent 3ab83417f5
commit e2e9431ca3
23 files changed
+327 -280

No files matched your search

+5 -5
View File
@@ -121,7 +121,7 @@ public:
char* spawntimeSecs = strtok(NULL, " ");
const GameObjectInfo *gInfo = ObjectMgr::GetGameObjectInfo(id);
const GameObjectTemplate *gInfo = sObjectMgr->GetGameObjectTemplate(id);
if (!gInfo)
{
@@ -149,7 +149,7 @@ public:
GameObject* pGameObj = new GameObject;
uint32 db_lowGUID = sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT);
if (!pGameObj->Create(db_lowGUID, gInfo->id, map, chr->GetPhaseMaskForSpawn(), x, y, z, o, 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY))
if (!pGameObj->Create(db_lowGUID, gInfo->entry, map, chr->GetPhaseMaskForSpawn(), x, y, z, o, 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY))
{
delete pGameObj;
return false;
@@ -303,7 +303,7 @@ public:
return false;
}
GameObjectInfo const* goI = ObjectMgr::GetGameObjectInfo(id);
GameObjectTemplate const* goI = sObjectMgr->GetGameObjectTemplate(id);
if (!goI)
{
@@ -556,7 +556,7 @@ public:
float z = fields[4].GetFloat();
uint16 mapid = fields[5].GetUInt16();
GameObjectInfo const * gInfo = ObjectMgr::GetGameObjectInfo(entry);
GameObjectTemplate const * gInfo = sObjectMgr->GetGameObjectTemplate(entry);
if (!gInfo)
continue;
@@ -588,7 +588,7 @@ public:
entry = atoi((char*)args);
}
GameObjectInfo const* goinfo = ObjectMgr::GetGameObjectInfo(entry);
GameObjectTemplate const* goinfo = sObjectMgr->GetGameObjectTemplate(entry);
if (!goinfo)
return false;