mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 03:12:09 +01:00
Core/OutdoorPvP: Fixed a crash that occured on accessing CapturePoints after GO removal
--HG-- branch : trunk
This commit is contained in:
@@ -598,3 +598,12 @@ void OutdoorPvP::OnGameObjectCreate(GameObject *go)
|
||||
if (OPvPCapturePoint *cp = GetCapturePoint(go->GetDBTableGUIDLow()))
|
||||
cp->m_capturePoint = go;
|
||||
}
|
||||
|
||||
void OutdoorPvP::OnGameObjectRemove(GameObject *go)
|
||||
{
|
||||
if (go->GetGoType() != GAMEOBJECT_TYPE_CAPTURE_POINT)
|
||||
return;
|
||||
|
||||
if (OPvPCapturePoint *cp = GetCapturePoint(go->GetDBTableGUIDLow()))
|
||||
cp->m_capturePoint = NULL;
|
||||
}
|
||||
|
||||
@@ -220,6 +220,7 @@ class OutdoorPvP : public ZoneScript
|
||||
virtual bool SetupOutdoorPvP() {return true;}
|
||||
|
||||
void OnGameObjectCreate(GameObject *go);
|
||||
void OnGameObjectRemove(GameObject *go);
|
||||
void OnCreatureCreate(Creature *) {}
|
||||
|
||||
// send world state update to all players present
|
||||
|
||||
Reference in New Issue
Block a user