mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-31 21:45:33 +00:00
Fix MR !103 breaking of dialogue with actors with no greetings
This commit is contained in:
parent
e0af6532ec
commit
c4d5203e14
2 changed files with 13 additions and 8 deletions
|
@ -432,26 +432,29 @@ namespace MWGui
|
|||
mGoodbye = false;
|
||||
mTopicsList->setEnabled(true);
|
||||
|
||||
if (!MWBase::Environment::get().getDialogueManager()->startDialogue(actor, mGreetingCallback.get()))
|
||||
setTitle(mPtr.getClass().getName(mPtr));
|
||||
|
||||
updateDisposition();
|
||||
restock();
|
||||
}
|
||||
|
||||
void DialogueWindow::onOpen()
|
||||
{
|
||||
if (!MWBase::Environment::get().getDialogueManager()->startDialogue(mPtr, mGreetingCallback.get()))
|
||||
{
|
||||
// No greetings found. The dialogue window should not be shown.
|
||||
// If this is a companion, we must show the companion window directly (used by BM_bear_be_unique).
|
||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Dialogue);
|
||||
if (isCompanion(mPtr))
|
||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Companion, mPtr);
|
||||
mPtr = MWWorld::Ptr();
|
||||
if (isCompanion(actor))
|
||||
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Companion, actor);
|
||||
return;
|
||||
}
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mGoodbyeButton);
|
||||
|
||||
setTitle(mPtr.getClass().getName(mPtr));
|
||||
|
||||
updateTopics();
|
||||
updateTopicsPane(); // force update for new services
|
||||
|
||||
updateDisposition();
|
||||
restock();
|
||||
}
|
||||
|
||||
void DialogueWindow::restock()
|
||||
|
|
|
@ -122,6 +122,8 @@ namespace MWGui
|
|||
|
||||
void setPtr(const MWWorld::Ptr& actor);
|
||||
|
||||
void onOpen();
|
||||
|
||||
void setKeywords(std::list<std::string> keyWord);
|
||||
|
||||
void addResponse (const std::string& title, const std::string& text, bool needMargin = true);
|
||||
|
|
Loading…
Reference in a new issue