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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user