fix(Core/Creature): Move DespawnOnEvade() respawn handling to map level (#17806)

This commit is contained in:
Andrew
2023-11-20 12:18:48 -03:00
committed by GitHub
parent e8ccda12e4
commit e3a7613f56
3 changed files with 22 additions and 2 deletions

View File

@@ -2102,8 +2102,10 @@ void Creature::ForcedDespawn(uint32 timeMSToDespawn, Seconds forceRespawnTimer)
if (forceRespawnTimer > Seconds::zero())
{
m_respawnTime = GameTime::GetGameTime().count() + forceRespawnTimer.count();
m_respawnDelay = forceRespawnTimer.count();
if (GetMap())
{
GetMap()->ScheduleCreatureRespawn(GetGUID(), forceRespawnTimer);
}
}
}