|
|
|
@ -61,29 +61,30 @@ void Dialogue::addInfo(const ESM::DialInfo& info, bool merge)
|
|
|
|
|
ESM::Dialogue::InfoContainer::iterator it = mInfo.end();
|
|
|
|
|
|
|
|
|
|
std::map<std::string, ESM::Dialogue::InfoContainer::iterator>::iterator lookup;
|
|
|
|
|
lookup = mLookup.find(info.mPrev);
|
|
|
|
|
|
|
|
|
|
lookup = mLookup.find(info.mId);
|
|
|
|
|
if (lookup != mLookup.end())
|
|
|
|
|
{
|
|
|
|
|
it = lookup->second;
|
|
|
|
|
|
|
|
|
|
mLookup[info.mId] = mInfo.insert(++it, info);
|
|
|
|
|
*it = info;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
lookup = mLookup.find(info.mNext);
|
|
|
|
|
lookup = mLookup.find(info.mPrev);
|
|
|
|
|
if (lookup != mLookup.end())
|
|
|
|
|
{
|
|
|
|
|
it = lookup->second;
|
|
|
|
|
|
|
|
|
|
mLookup[info.mId] = mInfo.insert(it, info);
|
|
|
|
|
mLookup[info.mId] = mInfo.insert(++it, info);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
lookup = mLookup.find(info.mId);
|
|
|
|
|
lookup = mLookup.find(info.mNext);
|
|
|
|
|
if (lookup != mLookup.end())
|
|
|
|
|
{
|
|
|
|
|
it = lookup->second;
|
|
|
|
|
*it = info;
|
|
|
|
|
|
|
|
|
|
mLookup[info.mId] = mInfo.insert(it, info);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|