|
30 | 30 |
|
31 | 31 | #include "../mwbase/environment.hpp" |
32 | 32 | #include "../mwbase/journal.hpp" |
| 33 | +#include "../mwbase/luamanager.hpp" |
33 | 34 | #include "../mwbase/mechanicsmanager.hpp" |
34 | 35 | #include "../mwbase/scriptmanager.hpp" |
35 | 36 | #include "../mwbase/soundmanager.hpp" |
@@ -178,6 +179,7 @@ namespace MWDialogue |
178 | 179 |
|
179 | 180 | MWScript::InterpreterContext interpreterContext(&mActor.getRefData().getLocals(), mActor); |
180 | 181 | callback->addResponse({}, Interpreter::fixDefinesDialog(info->mResponse, interpreterContext)); |
| 182 | + MWBase::Environment::get().getLuaManager()->onDialogueResponse(mActor, *info, dialogue); |
181 | 183 | executeScript(info->mResultScript, mActor); |
182 | 184 | mLastTopic = dialogue.mId; |
183 | 185 |
|
@@ -307,6 +309,7 @@ namespace MWDialogue |
307 | 309 |
|
308 | 310 | MWScript::InterpreterContext interpreterContext(&mActor.getRefData().getLocals(), mActor); |
309 | 311 | callback->addResponse(title, Interpreter::fixDefinesDialog(info->mResponse, interpreterContext)); |
| 312 | + MWBase::Environment::get().getLuaManager()->onDialogueResponse(mActor, *info, dialogue); |
310 | 313 |
|
311 | 314 | if (dialogue.mType == ESM::Dialogue::Topic) |
312 | 315 | { |
@@ -477,6 +480,7 @@ namespace MWDialogue |
477 | 480 |
|
478 | 481 | MWScript::InterpreterContext interpreterContext(&mActor.getRefData().getLocals(), mActor); |
479 | 482 | callback->addResponse({}, Interpreter::fixDefinesDialog(text, interpreterContext)); |
| 483 | + MWBase::Environment::get().getLuaManager()->onDialogueResponse(mActor, *info, *dialogue); |
480 | 484 |
|
481 | 485 | if (dialogue->mType == ESM::Dialogue::Topic) |
482 | 486 | { |
@@ -606,6 +610,7 @@ namespace MWDialogue |
606 | 610 |
|
607 | 611 | callback->addResponse(gmsts.find("sServiceRefusal")->mValue.getString(), |
608 | 612 | Interpreter::fixDefinesDialog(info->mResponse, interpreterContext)); |
| 613 | + MWBase::Environment::get().getLuaManager()->onDialogueResponse(mActor, *info, dialogue); |
609 | 614 |
|
610 | 615 | executeScript(info->mResultScript, mActor); |
611 | 616 | return true; |
@@ -649,6 +654,7 @@ namespace MWDialogue |
649 | 654 | sndMgr->say(actor, Misc::ResourceHelpers::correctSoundPath(VFS::Path::Normalized(info->mSound))); |
650 | 655 | if (!info->mResultScript.empty()) |
651 | 656 | executeScript(info->mResultScript, actor); |
| 657 | + MWBase::Environment::get().getLuaManager()->onDialogueResponse(actor, *info, *dial); |
652 | 658 | } |
653 | 659 | return info != nullptr; |
654 | 660 | } |
|
0 commit comments