aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/server/game/OutdoorPvP/OutdoorPvP.cpp9
-rwxr-xr-xsrc/server/game/OutdoorPvP/OutdoorPvP.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
index 878cc3325f7..af543c27ea8 100755
--- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp
@@ -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;
+}
diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.h b/src/server/game/OutdoorPvP/OutdoorPvP.h
index a66c3c129fd..406f5ec9c51 100755
--- a/src/server/game/OutdoorPvP/OutdoorPvP.h
+++ b/src/server/game/OutdoorPvP/OutdoorPvP.h
@@ -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