1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-06 01:45:33 +00:00

Update the dialogue topic list after running greeting script

This commit is contained in:
scrawl 2015-10-18 21:40:16 +02:00
parent 04df656f54
commit 93565eccbf

View file

@ -139,9 +139,6 @@ namespace MWDialogue
win->startDialogue(actor, actor.getClass().getName (actor), resetHistory);
//setup the list of topics known by the actor. Topics who are also on the knownTopics list will be added to the GUI
updateTopics();
//greeting
const MWWorld::Store<ESM::Dialogue> &dialogs =
MWBase::Environment::get().getWorld()->getStore().get<ESM::Dialogue>();
@ -165,12 +162,19 @@ namespace MWDialogue
// TODO play sound
}
// first topics update so that parseText knows the keywords to highlight
updateTopics();
parseText (info->mResponse);
MWScript::InterpreterContext interpreterContext(&mActor.getRefData().getLocals(),mActor);
win->addResponse (Interpreter::fixDefinesDialog(info->mResponse, interpreterContext));
executeScript (info->mResultScript);
mLastTopic = Misc::StringUtils::lowerCase(it->mId);
// update topics again to accomodate changes resulting from executeScript
updateTopics();
return;
}
}