aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManuel <manue.l@live.com.ar>2011-01-24 18:56:06 -0300
committerManuel <manue.l@live.com.ar>2011-01-24 18:56:06 -0300
commitfb950c00ee64860ca818465ea93abb144fbaafc6 (patch)
tree9ce3b17dd4f3210fd369b62b4a555e9f79e0c81c /src
parent867bc197efbdcf24bf063e842c91c12bba8b0c4c (diff)
Core/ZoneScript: Implemented OnCreatureDeath function.
Signed-off-by: Manuel <manue.l@live.com.ar>
Diffstat (limited to 'src')
-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*/) {}