aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2020-10-25 13:29:36 +0100
committerjackpoz <giacomopoz@gmail.com>2020-10-25 13:29:58 +0100
commit28a1132211aaf8d43e3459a7dc8ee093df1bcfa0 (patch)
treec0903af48f0eb3aa1a5cbf86ccfc1830a4949013 /src
parentd7459cccedc7ca9ba85e209dfeef61969fc78d9a (diff)
Core/AI: Fix CorpseRemoved() and SMART_EVENT_CORPSE_REMOVED not being called for creatures without m_respawnCompatibilityMode
Fixes #24958
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index d8d11fca1c9..34983028dc5 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -405,6 +405,9 @@ void Creature::RemoveCorpse(bool setSpawnTime, bool destroyForNearbyPlayers)
}
else
{
+ if (CreatureAI* ai = AI())
+ ai->CorpseRemoved(m_respawnDelay);
+
// In case this is called directly and normal respawn timer not set
// Since this timer will be longer than the already present time it
// will be ignored if the correct place added a respawn timer