mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/ZoneScript: Implemented OnCreatureDeath function.
Signed-off-by: Manuel <manue.l@live.com.ar>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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*/) {}
|
||||
|
||||
Reference in New Issue
Block a user