forked from teamnwah/openmw-tes3coop
Don't add duplicate topic responses to the journal
This commit is contained in:
parent
37ef8ec908
commit
a988a0d6dc
1 changed files with 7 additions and 0 deletions
|
@ -24,6 +24,13 @@ namespace MWDialogue
|
||||||
if (entry.mTopic!=mTopic)
|
if (entry.mTopic!=mTopic)
|
||||||
throw std::runtime_error ("topic does not match: " + mTopic);
|
throw std::runtime_error ("topic does not match: " + mTopic);
|
||||||
|
|
||||||
|
// bail out if we already have heard this
|
||||||
|
for (Topic::TEntryIter it = mEntries.begin(); it != mEntries.end(); ++it)
|
||||||
|
{
|
||||||
|
if (it->mInfoId == entry.mInfoId)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mEntries.push_back (entry); // we want slicing here
|
mEntries.push_back (entry); // we want slicing here
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue