fix(Scripts/Commands): Re-spawn pool quests after reload quest starters (#24696)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
blinkysc
2026-02-13 02:42:13 -06:00
committed by GitHub
parent 504f5a186e
commit 7fc57744d9
4 changed files with 319 additions and 0 deletions
+14
View File
@@ -1038,6 +1038,20 @@ void PoolMgr::ChangeWeeklyQuests()
SaveQuestsToDB(false, true, false);
}
void PoolMgr::ReSpawnPoolQuests()
{
for (auto& [questId, poolId] : mQuestSearchMap)
{
if (IsSpawnedObject<Quest>(questId))
{
PoolObject tempObj(questId, 0.0f);
auto it = mPoolQuestGroups.find(poolId);
if (it != mPoolQuestGroups.end())
it->second.Spawn1Object(&tempObj);
}
}
}
// Call to spawn a pool, if cache if true the method will spawn only if cached entry is different
// If it's same, the creature is respawned only (added back to map)
template<>