mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-03 19:13:49 +00:00
fix(Core/Creature): Allow temp summons to respawn when despawning on … (#21363)
This commit is contained in:
@@ -3718,12 +3718,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);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -596,7 +596,7 @@ public:
|
||||
|
||||
TaskScheduler _creatureRespawnScheduler;
|
||||
|
||||
void ScheduleCreatureRespawn(ObjectGuid /*creatureGuid*/, Milliseconds /*respawnTimer*/);
|
||||
void ScheduleCreatureRespawn(ObjectGuid /*creatureGuid*/, Milliseconds /*respawnTimer*/, Position pos = Position());
|
||||
|
||||
void LoadCorpseData();
|
||||
void DeleteCorpseData();
|
||||
|
||||
Reference in New Issue
Block a user