forked from teamnwah/openmw-tes3coop
Do not add greetings to the journal index (bug #4342)
This commit is contained in:
parent
58de366c21
commit
b6ae7f3cc8
1 changed files with 11 additions and 9 deletions
|
@ -146,7 +146,6 @@ namespace MWDialogue
|
||||||
// TODO play sound
|
// TODO play sound
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MWScript::InterpreterContext interpreterContext(&mActor.getRefData().getLocals(),mActor);
|
MWScript::InterpreterContext interpreterContext(&mActor.getRefData().getLocals(),mActor);
|
||||||
callback->addResponse("", Interpreter::fixDefinesDialog(info->mResponse, interpreterContext));
|
callback->addResponse("", Interpreter::fixDefinesDialog(info->mResponse, interpreterContext));
|
||||||
executeScript (info->mResultScript, mActor);
|
executeScript (info->mResultScript, mActor);
|
||||||
|
@ -387,7 +386,7 @@ namespace MWDialogue
|
||||||
{
|
{
|
||||||
Filter filter (mActor, mChoice, mTalkedTo);
|
Filter filter (mActor, mChoice, mTalkedTo);
|
||||||
|
|
||||||
if (dialogue->mType == ESM::Dialogue::Topic || dialogue->mType == ESM::Dialogue::Greeting)
|
if (dialogue->mType == ESM::Dialogue::Topic || dialogue->mType == ESM::Dialogue::Greeting)
|
||||||
{
|
{
|
||||||
if (const ESM::DialInfo *info = filter.search (*dialogue, true))
|
if (const ESM::DialInfo *info = filter.search (*dialogue, true))
|
||||||
{
|
{
|
||||||
|
@ -401,15 +400,18 @@ namespace MWDialogue
|
||||||
MWScript::InterpreterContext interpreterContext(&mActor.getRefData().getLocals(),mActor);
|
MWScript::InterpreterContext interpreterContext(&mActor.getRefData().getLocals(),mActor);
|
||||||
callback->addResponse("", Interpreter::fixDefinesDialog(text, interpreterContext));
|
callback->addResponse("", Interpreter::fixDefinesDialog(text, interpreterContext));
|
||||||
|
|
||||||
// Make sure the returned DialInfo is from the Dialogue we supplied. If could also be from the Info refusal group,
|
if (dialogue->mType == ESM::Dialogue::Topic)
|
||||||
// in which case it should not be added to the journal.
|
|
||||||
for (ESM::Dialogue::InfoContainer::const_iterator iter = dialogue->mInfo.begin();
|
|
||||||
iter!=dialogue->mInfo.end(); ++iter)
|
|
||||||
{
|
{
|
||||||
if (iter->mId == info->mId)
|
// Make sure the returned DialInfo is from the Dialogue we supplied. If could also be from the Info refusal group,
|
||||||
|
// in which case it should not be added to the journal
|
||||||
|
for (ESM::Dialogue::InfoContainer::const_iterator iter = dialogue->mInfo.begin();
|
||||||
|
iter!=dialogue->mInfo.end(); ++iter)
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getJournal()->addTopic (Misc::StringUtils::lowerCase(mLastTopic), info->mId, mActor);
|
if (iter->mId == info->mId)
|
||||||
break;
|
{
|
||||||
|
MWBase::Environment::get().getJournal()->addTopic (Misc::StringUtils::lowerCase(mLastTopic), info->mId, mActor);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue