|
|
@ -78,13 +78,12 @@ namespace ESM
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ESM::DialInfo info;
|
|
|
|
ESM::DialInfo info;
|
|
|
|
info.loadId(esm);
|
|
|
|
info.loadId(esm);
|
|
|
|
|
|
|
|
|
|
|
|
bool isDeleted = false;
|
|
|
|
bool isDeleted = false;
|
|
|
|
|
|
|
|
info.loadData(esm, isDeleted);
|
|
|
|
|
|
|
|
|
|
|
|
if (!merge || mInfo.empty())
|
|
|
|
if (!merge || mInfo.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
info.loadData(esm, isDeleted);
|
|
|
|
|
|
|
|
mLookup[info.mId] = std::make_pair(mInfo.insert(mInfo.end(), info), isDeleted);
|
|
|
|
mLookup[info.mId] = std::make_pair(mInfo.insert(mInfo.end(), info), isDeleted);
|
|
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -96,20 +95,10 @@ namespace ESM
|
|
|
|
if (lookup != mLookup.end())
|
|
|
|
if (lookup != mLookup.end())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
it = lookup->second.first;
|
|
|
|
it = lookup->second.first;
|
|
|
|
|
|
|
|
// Since the new version of this record may have changed the next/prev linked list connection, we need to re-insert the record
|
|
|
|
// Merge with existing record. Only the subrecords that are present in
|
|
|
|
|
|
|
|
// the new record will be overwritten.
|
|
|
|
|
|
|
|
it->loadData(esm, isDeleted);
|
|
|
|
|
|
|
|
info = *it;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Since the record merging may have changed the next/prev linked list connection, we need to re-insert the record
|
|
|
|
|
|
|
|
mInfo.erase(it);
|
|
|
|
mInfo.erase(it);
|
|
|
|
mLookup.erase(lookup);
|
|
|
|
mLookup.erase(lookup);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
info.loadData(esm, isDeleted);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (info.mNext.empty())
|
|
|
|
if (info.mNext.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|