aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/server/game/Entities/Creature/Creature.cpp3
-rwxr-xr-xsrc/server/game/Maps/ZoneScript.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 13e3234412f..81fef99cf26 100755
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -1525,6 +1525,9 @@ void Creature::setDeathState(DeathState s)
if (m_formation && m_formation->getLeader() == this)
m_formation->FormationReset(true);
+ if (ZoneScript* zoneScript = GetZoneScript())
+ zoneScript->OnCreatureDeath(this);
+
if ((canFly() || IsFlying()) && FallGround())
return;
diff --git a/src/server/game/Maps/ZoneScript.h b/src/server/game/Maps/ZoneScript.h
index d9e8d132831..0147e333f41 100755
--- a/src/server/game/Maps/ZoneScript.h
+++ b/src/server/game/Maps/ZoneScript.h
@@ -38,6 +38,8 @@ class ZoneScript
virtual void OnGameObjectCreate(GameObject *) {}
virtual void OnGameObjectRemove(GameObject *) {}
+ virtual void OnCreatureDeath(Creature* /*creature*/) {}
+
//All-purpose data storage 64 bit
virtual uint64 GetData64(uint32 /*DataId*/) { return 0; }
virtual void SetData64(uint32 /*DataId*/, uint64 /*Value*/) {}