Core/Scripts: Split OnCreatureCreate() and OnGameObjectCreate() into two virtual functions each.

Note to scripters: be aware that you will need to hook into the Remove functions if you want to do stuff at GO/creature removal.
Closes issue 5011.

--HG--
branch : trunk
This commit is contained in:
leak
2010-12-05 18:04:10 +01:00
parent dfa1e9532b
commit 6fe19b5a86
65 changed files with 1139 additions and 1132 deletions
@@ -137,29 +137,29 @@ public:
}
}
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
void OnCreatureCreate(Creature* creature)
{
switch(pCreature->GetEntry())
switch(creature->GetEntry())
{
case 24723: SelinGUID = pCreature->GetGUID(); break;
case 24560: DelrissaGUID = pCreature->GetGUID(); break;
case 24722: FelCrystals.push_back(pCreature->GetGUID()); break;
case 24723: SelinGUID = creature->GetGUID(); break;
case 24560: DelrissaGUID = creature->GetGUID(); break;
case 24722: FelCrystals.push_back(creature->GetGUID()); break;
}
}
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
void OnGameObjectCreate(GameObject* go)
{
switch(pGo->GetEntry())
switch(go->GetEntry())
{
case 187896: VexallusDoorGUID = pGo->GetGUID(); break;
case 187896: VexallusDoorGUID = go->GetGUID(); break;
//SunwellRaid Gate 02
case 187979: SelinDoorGUID = pGo->GetGUID(); break;
case 187979: SelinDoorGUID = go->GetGUID(); break;
//Assembly Chamber Door
case 188065: SelinEncounterDoorGUID = pGo->GetGUID(); break;
case 187770: DelrissaDoorGUID = pGo->GetGUID(); break;
case 188064: KaelDoorGUID = pGo->GetGUID(); break;
case 188165: KaelStatue[0] = pGo->GetGUID(); break;
case 188166: KaelStatue[1] = pGo->GetGUID(); break;
case 188065: SelinEncounterDoorGUID = go->GetGUID(); break;
case 187770: DelrissaDoorGUID = go->GetGUID(); break;
case 188064: KaelDoorGUID = go->GetGUID(); break;
case 188165: KaelStatue[0] = go->GetGUID(); break;
case 188166: KaelStatue[1] = go->GetGUID(); break;
}
}