From 6f41e0d12ef70e56eb2ca49ccb10bcff353110a7 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 27 Jan 2015 01:53:51 +0100 Subject: [PATCH] Reapply quest index when loading quest from savegame (Bug #2260) --- apps/openmw/mwdialogue/journalimp.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwdialogue/journalimp.cpp b/apps/openmw/mwdialogue/journalimp.cpp index 3b57912da..99dab0cf8 100644 --- a/apps/openmw/mwdialogue/journalimp.cpp +++ b/apps/openmw/mwdialogue/journalimp.cpp @@ -259,7 +259,12 @@ namespace MWDialogue record.load (reader); if (isThere (record.mTopic)) - mQuests.insert (std::make_pair (record.mTopic, record)); + { + std::pair result = mQuests.insert (std::make_pair (record.mTopic, record)); + // reapply quest index, this is to handle users upgrading from only + // Morrowind.esm (no quest states) to Morrowind.esm + Tribunal.esm + result.first->second.setIndex(record.mState); + } } } }