Core/AI: Fix CorpseRemoved() and SMART_EVENT_CORPSE_REMOVED not being called for creatures without m_respawnCompatibilityMode

Fixes #24958
This commit is contained in:
jackpoz
2020-10-25 13:29:36 +01:00
parent d7459ccced
commit 28a1132211

View File

@@ -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