mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04:00
Don't add duplicate topic responses to the journal
This commit is contained in:
parent
37ef8ec908
commit
a988a0d6dc
@ -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…
x
Reference in New Issue
Block a user