mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-28 14:35:57 +00:00
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:
@@ -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<>
|
||||
|
||||
@@ -130,10 +130,12 @@ public:
|
||||
|
||||
void ChangeDailyQuests();
|
||||
void ChangeWeeklyQuests();
|
||||
void ReSpawnPoolQuests();
|
||||
|
||||
PooledQuestRelation mQuestCreatureRelation;
|
||||
PooledQuestRelation mQuestGORelation;
|
||||
|
||||
friend class PoolQuestReloadFixTest;
|
||||
private:
|
||||
template<typename T>
|
||||
void SpawnPool(uint32 pool_id, uint32 db_guid_or_pool_id);
|
||||
|
||||
Reference in New Issue
Block a user