From 1a354f88acace854cc7cbb6c04e0cf8c57cce4fc Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Thu, 7 Jun 2018 22:05:55 +0300 Subject: [PATCH 1/3] Make choices trigger goodbye if Goodbye is used (fixes #3897) --- CHANGELOG.md | 1 + apps/openmw/mwgui/dialogue.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cbef559d..0fbc5092f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ 0.45.0 ------ + Feature #3897: Have Goodbye give all choices the effects of Goodbye Bug #4293: Faction members are not aware of faction ownerships in barter Bug #4426: RotateWorld behavior is incorrect Bug #4433: Guard behaviour is incorrect with Alarm = 0 diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index 14bbe81ef..450799f29 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -635,6 +635,11 @@ namespace MWGui void DialogueWindow::onChoiceActivated(int id) { + if (mGoodbye) + { + onGoodbyeActivated(); + return; + } MWBase::Environment::get().getDialogueManager()->questionAnswered(id, mCallback.get()); updateTopics(); } From 99781ab70c11c25bb92c1fadb75b7173676328ae Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Fri, 8 Jun 2018 19:15:31 +0300 Subject: [PATCH 2/3] Fix changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fbc5092f..333ae6f91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ 0.45.0 ------ - Feature #3897: Have Goodbye give all choices the effects of Goodbye + Bug #3897: Have Goodbye give all choices the effects of Goodbye Bug #4293: Faction members are not aware of faction ownerships in barter Bug #4426: RotateWorld behavior is incorrect Bug #4433: Guard behaviour is incorrect with Alarm = 0 From b274931165c85b0ead18f4fc89c7e2ae6b83e036 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Fri, 8 Jun 2018 19:18:53 +0300 Subject: [PATCH 3/3] Revert erroneous changes --- apps/openmw/mwdialogue/dialoguemanagerimp.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/apps/openmw/mwdialogue/dialoguemanagerimp.cpp b/apps/openmw/mwdialogue/dialoguemanagerimp.cpp index da6e80e79..fb492ff3b 100644 --- a/apps/openmw/mwdialogue/dialoguemanagerimp.cpp +++ b/apps/openmw/mwdialogue/dialoguemanagerimp.cpp @@ -431,11 +431,8 @@ namespace MWDialogue void DialogueManager::addChoice (const std::string& text, int choice) { - if (!mGoodbye) - { - mIsInChoice = true; - mChoices.push_back(std::make_pair(text, choice)); - } + mIsInChoice = true; + mChoices.push_back(std::make_pair(text, choice)); } const std::vector >& DialogueManager::getChoices() @@ -450,8 +447,8 @@ namespace MWDialogue void DialogueManager::goodbye() { - if (!mIsInChoice) - mGoodbye = true; + mIsInChoice = false; + mGoodbye = true; } void DialogueManager::persuade(int type, ResponseCallback* callback)