Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2025-02-11 22:35:57 +08:00
62 changed files with 1532 additions and 1969 deletions

View File

@@ -3724,14 +3724,14 @@ void Map::RemoveOldCorpses()
}
}
void Map::ScheduleCreatureRespawn(ObjectGuid creatureGuid, Milliseconds respawnTimer)
void Map::ScheduleCreatureRespawn(ObjectGuid creatureGuid, Milliseconds respawnTimer, Position pos)
{
_creatureRespawnScheduler.Schedule(respawnTimer, [this, creatureGuid](TaskContext)
_creatureRespawnScheduler.Schedule(respawnTimer, [this, creatureGuid, pos](TaskContext)
{
if (Creature* creature = GetCreature(creatureGuid))
{
creature->Respawn();
}
else
SummonCreature(creatureGuid.GetEntry(), pos);
});
}