Skip to content

Commit

Permalink
Map: Fix ScriptedInstance::RespawnDbGuids for spawn group
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Sep 17, 2023
1 parent 08bef1e commit a9587c6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/game/AI/ScriptDevAI/include/sc_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ void ScriptedInstance::DespawnGuids(GuidVector& spawns)

void ScriptedInstance::RespawnDbGuids(std::vector<uint32>& spawns, uint32 respawnDelay)
{
time_t respawnTime = time(nullptr) + respawnDelay;
for (uint32 spawn : spawns)
{
if (respawnDelay)
Expand All @@ -219,6 +220,7 @@ void ScriptedInstance::RespawnDbGuids(std::vector<uint32>& spawns, uint32 respaw
}
}
instance->GetSpawnManager().RespawnCreature(spawn, respawnDelay);
instance->GetPersistentState()->SaveCreatureRespawnTime(spawn, respawnTime);
}
}

Expand Down

0 comments on commit a9587c6

Please sign in to comment.