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
@@ -55,21 +55,21 @@ public:
m_uiIkissDoorGUID = 0;
}
void OnCreatureCreate(Creature* pCreature, bool /*add*/)
void OnCreatureCreate(Creature* creature)
{
if (pCreature->GetEntry() == NPC_ANZU)
if (creature->GetEntry() == NPC_ANZU)
{
if (AnzuEncounter >= IN_PROGRESS)
pCreature->DisappearAndDie();
creature->DisappearAndDie();
else
AnzuEncounter = IN_PROGRESS;
}
}
void OnGameObjectCreate(GameObject* pGo, bool /*add*/)
void OnGameObjectCreate(GameObject* go)
{
if (pGo->GetEntry() == IKISS_DOOR)
m_uiIkissDoorGUID = pGo->GetGUID();
if (go->GetEntry() == IKISS_DOOR)
m_uiIkissDoorGUID = go->GetGUID();
}
void SetData(uint32 type, uint32 data)