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
@@ -82,27 +82,27 @@ public:
return false;
}
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
void OnCreatureCreate(Creature* creature)
{
switch(pCreature->GetEntry())
switch(creature->GetEntry())
{
case 18835: KigglerTheCrazed = pCreature->GetGUID(); break;
case 18836: BlindeyeTheSeer = pCreature->GetGUID(); break;
case 18834: OlmTheSummoner = pCreature->GetGUID(); break;
case 18832: KroshFirehand = pCreature->GetGUID(); break;
case 18831: Maulgar = pCreature->GetGUID(); break;
case 18835: KigglerTheCrazed = creature->GetGUID(); break;
case 18836: BlindeyeTheSeer = creature->GetGUID(); break;
case 18834: OlmTheSummoner = creature->GetGUID(); break;
case 18832: KroshFirehand = creature->GetGUID(); break;
case 18831: Maulgar = creature->GetGUID(); break;
}
}
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
void OnGameObjectCreate(GameObject* go)
{
switch(pGo->GetEntry())
switch(go->GetEntry())
{
case 184468:
MaulgarDoor = pGo->GetGUID();
if (m_auiEncounter[0] == DONE) HandleGameObject(NULL, true, pGo);
MaulgarDoor = go->GetGUID();
if (m_auiEncounter[0] == DONE) HandleGameObject(NULL, true, go);
break;
case 184662: GruulDoor = pGo->GetGUID(); break;
case 184662: GruulDoor = go->GetGUID(); break;
}
}