From ce2cb709c51972e913cfe4a704c315a98b548dd8 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sun, 18 Mar 2012 19:05:35 +0100 Subject: [PATCH] fixed getJournalIndex function --- apps/openmw/mwdialogue/journal.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwdialogue/journal.cpp b/apps/openmw/mwdialogue/journal.cpp index 42cce5cf5..ea4a5a01e 100644 --- a/apps/openmw/mwdialogue/journal.cpp +++ b/apps/openmw/mwdialogue/journal.cpp @@ -60,7 +60,12 @@ namespace MWDialogue int Journal::getJournalIndex (const std::string& id) const { - return 0; + TQuestContainer::const_iterator iter = mQuests.find (id); + + if (iter==mQuests.end()) + return 0; + + return iter->second.getIndex(); } Journal::TEntryIter Journal::begin() const