mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 22:15:32 +00:00
Fix overwriting DialInfo
This commit is contained in:
parent
a87b64d2da
commit
3dceb7ee4f
1 changed files with 9 additions and 8 deletions
|
@ -61,6 +61,15 @@ void Dialogue::addInfo(const ESM::DialInfo& info, bool merge)
|
||||||
ESM::Dialogue::InfoContainer::iterator it = mInfo.end();
|
ESM::Dialogue::InfoContainer::iterator it = mInfo.end();
|
||||||
|
|
||||||
std::map<std::string, ESM::Dialogue::InfoContainer::iterator>::iterator lookup;
|
std::map<std::string, ESM::Dialogue::InfoContainer::iterator>::iterator lookup;
|
||||||
|
|
||||||
|
lookup = mLookup.find(info.mId);
|
||||||
|
if (lookup != mLookup.end())
|
||||||
|
{
|
||||||
|
it = lookup->second;
|
||||||
|
*it = info;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
lookup = mLookup.find(info.mPrev);
|
lookup = mLookup.find(info.mPrev);
|
||||||
if (lookup != mLookup.end())
|
if (lookup != mLookup.end())
|
||||||
{
|
{
|
||||||
|
@ -79,14 +88,6 @@ void Dialogue::addInfo(const ESM::DialInfo& info, bool merge)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lookup = mLookup.find(info.mId);
|
|
||||||
if (lookup != mLookup.end())
|
|
||||||
{
|
|
||||||
it = lookup->second;
|
|
||||||
*it = info;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cerr << "Failed to insert info " << info.mId << std::endl;
|
std::cerr << "Failed to insert info " << info.mId << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue