From 5fc2b1a41b1f308cb7390c80ad8e2adcd62b4dc5 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 18 May 2014 07:37:32 +0200 Subject: [PATCH] Allow setting a journal index even if there's no related journal entry This is used by the MV_SlaveMule quest. --- apps/openmw/mwdialogue/quest.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/openmw/mwdialogue/quest.cpp b/apps/openmw/mwdialogue/quest.cpp index a5411b747..8ecb4bd13 100644 --- a/apps/openmw/mwdialogue/quest.cpp +++ b/apps/openmw/mwdialogue/quest.cpp @@ -45,7 +45,6 @@ namespace MWDialogue const ESM::Dialogue *dialogue = MWBase::Environment::get().getWorld()->getStore().get().find (mTopic); - bool found=false; for (std::vector::const_iterator iter (dialogue->mInfo.begin()); iter!=dialogue->mInfo.end(); ++iter) if (iter->mData.mDisposition==index && iter->mQuestStatus!=ESM::DialInfo::QS_Name) @@ -55,14 +54,11 @@ namespace MWDialogue else if (iter->mQuestStatus==ESM::DialInfo::QS_Restart) mFinished = false; - found = true; // Don't return here. Quest status may actually be in a different info record, since we don't merge these (yet?) } - if (found) - mIndex = index; - else - throw std::runtime_error ("unknown journal index for topic " + mTopic); + // The index must be set even if no related journal entry was found + mIndex = index; } bool Quest::isFinished() const