From ae301df9fdca1be183529190db5fce9def386647 Mon Sep 17 00:00:00 2001 From: killerwife Date: Tue, 22 Mar 2016 12:24:24 +0000 Subject: [PATCH] Fix for branching within exclusiveGroup questline. Fixed a special case when quest A has prequest B, that has exclusiveGroup<0, and exclusiveGroup relates to quest C, hence quest A should continue just after parent activation/completion not whole exclusiveGroup completion. See https://github.com/classicdb/database/issues/761 for a good write up of the issue --- src/game/Object/Player.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/game/Object/Player.cpp b/src/game/Object/Player.cpp index f0dd4a80..5152e91d 100644 --- a/src/game/Object/Player.cpp +++ b/src/game/Object/Player.cpp @@ -12424,6 +12424,10 @@ bool Player::SatisfyQuestPreviousQuest(Quest const* qInfo, bool msg) const { return true; } // each-from-all exclusive group ( < 0) + // given a group with 2+ quests, and one of those has a branch that is not restricted by the group, return true + if (qInfo->GetPrevQuestId() != 0 && qPrevInfo->GetNextQuestId() != qInfo->GetPrevQuestId()) + { return true; } + // can be start if only all quests in prev quest exclusive group completed and rewarded ExclusiveQuestGroupsMapBounds bounds = sObjectMgr.GetExclusiveQuestGroupsMapBounds(qPrevInfo->GetExclusiveGroup()); @@ -12458,6 +12462,10 @@ bool Player::SatisfyQuestPreviousQuest(Quest const* qInfo, bool msg) const { return true; } // each-from-all exclusive group ( < 0) + // given a group with 2+ quests, and one of those has a branch that is not restricted by the group, return true + if (qInfo->GetPrevQuestId() != 0 && qPrevInfo->GetNextQuestId() != abs(qInfo->GetPrevQuestId())) + { return true; } + // can be start if only all quests in prev quest exclusive group active ExclusiveQuestGroupsMapBounds bounds = sObjectMgr.GetExclusiveQuestGroupsMapBounds(qPrevInfo->GetExclusiveGroup());