aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOvah <dreadkiller@gmx.de>2021-08-22 09:58:46 +0200
committerShauren <shauren.trinity@gmail.com>2022-03-13 19:31:14 +0100
commita5889ba3eb7bb47abbabc5def5dd8815780ad3e2 (patch)
tree179cadb7c91c1c1a370d74a7a0a97cd3b9ae2268 /src
parent015b4e4578e2cd3f8dbb339c963b9962fd604f8d (diff)
Core/Quests: check PreviousQuestID values as well when trying to make quest groups available to players (#26769)
* Core/Quests: check PreviousQuestID values as well when trying to make a quest available to support quest group requirements for another quest group * checking for previous quests via NextQuestID only works for single followup quests. However, if we want to make multiple quests available after rewarding all quests of an exclusive group we have to consider PreviousQuestID values as well as every single quest of the next quest group has to check the rewarded exclusive group * only check for previous quests that must be rewarded instead of being active (cherry picked from commit a0aa9730e25197f8be2611f3b7800bdb979cad35)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index 7e8b106921d..4732607a727 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -5240,6 +5240,8 @@ void ObjectMgr::LoadQuests()
TC_LOG_ERROR("sql.sql", "Quest %d has PrevQuestId %i, but no such quest", qinfo->GetQuestId(), qinfo->GetPrevQuestId());
else if (prevQuestItr->second._breadcrumbForQuestId)
TC_LOG_ERROR("sql.sql", "Quest %u should not be unlocked by breadcrumb quest %u", qinfo->_id, prevQuestId);
+ else if (qinfo->_prevQuestID > 0)
+ qinfo->DependentPreviousQuests.push_back(prevQuestId);
}
if (uint32 nextQuestId = qinfo->_nextQuestID)