Core/Creatures: implement CREATURE_STATIC_FLAG_DESPAWN_INSTANTLY

This commit is contained in:
Ovahlord committed 2023-08-27 19:52:09 +02:00
1 parent 5f2dbdd63c
commit 58302441a2
1 file changed
+4 -1
@@ -1941,7 +1941,10 @@ void Creature::setDeathState(DeathState s)
if (s == JUST_DIED)
{
m_corpseRemoveTime = GameTime::GetGameTime() + m_corpseDelay;
m_corpseRemoveTime = GameTime::GetGameTime();
if (!HasStaticFlag(CREATURE_STATIC_FLAG_DESPAWN_INSTANTLY))
m_corpseRemoveTime += m_corpseDelay;
uint32 respawnDelay = m_respawnDelay;
if (uint32 scalingMode = sWorld->getIntConfig(CONFIG_RESPAWN_DYNAMICMODE))
GetMap()->ApplyDynamicModeRespawnScaling(this, m_spawnId, respawnDelay, scalingMode);