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
+2 -2
View File
@@ -590,11 +590,11 @@ void OutdoorPvP::TeamApplyBuff(TeamId team, uint32 spellId, uint32 spellId2)
TeamCastSpell(OTHER_TEAM(team), spellId2 ? -(int32)spellId2 : -(int32)spellId);
}
void OutdoorPvP::OnGameObjectCreate(GameObject *go, bool add)
void OutdoorPvP::OnGameObjectCreate(GameObject *go)
{
if (go->GetGoType() != GAMEOBJECT_TYPE_CAPTURE_POINT)
return;
if (OPvPCapturePoint *cp = GetCapturePoint(go->GetDBTableGUIDLow()))
cp->m_capturePoint = add ? go : NULL;
cp->m_capturePoint = go;
}
+2 -2
View File
@@ -219,8 +219,8 @@ class OutdoorPvP : public ZoneScript
// setup stuff
virtual bool SetupOutdoorPvP() {return true;}
void OnGameObjectCreate(GameObject *go, bool add);
void OnCreatureCreate(Creature *, bool /*add*/) {}
void OnGameObjectCreate(GameObject *go);
void OnCreatureCreate(Creature *) {}
// send world state update to all players present
void SendUpdateWorldState(uint32 field, uint32 value);