Core/ObjectMgr: Refactor sGOStorage

This commit is contained in:
leak
2011-04-28 22:54:30 +02:00
parent 3ab83417f5
commit e2e9431ca3
23 changed files with 327 additions and 280 deletions
+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;
@@ -1094,7 +1094,7 @@ class spell_sindragosa_ice_tomb : public SpellScriptLoader
{
if (!ObjectMgr::GetCreatureTemplate(NPC_ICE_TOMB))
return false;
if (!ObjectMgr::GetGameObjectInfo(GO_ICE_BLOCK))
if (!sObjectMgr->GetGameObjectTemplate(GO_ICE_BLOCK))
return false;
return true;
}
@@ -216,7 +216,7 @@ bool OutdoorPvPSI::HandleCustomSpell(Player *plr, uint32 spellId, GameObject *go
if (!go || spellId != SI_SILITHYST_FLAG_GO_SPELL)
return false;
plr->CastSpell(plr,SI_SILITHYST_FLAG,true);
if (go->GetGOInfo()->id == SI_SILITHYST_MOUND)
if (go->GetGOInfo()->entry == SI_SILITHYST_MOUND)
{
// despawn go
go->SetRespawnTime(0);