1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-21 09:39:43 +00:00

Remove INAM handling from InfoCollection

This commit is contained in:
Stanislav Bas 2015-07-13 11:19:14 +03:00
parent c8c79dc1ef
commit 71e5fc7f04

View file

@ -107,21 +107,18 @@ bool CSMWorld::InfoCollection::reorderRows (int baseIndex, const std::vector<int
void CSMWorld::InfoCollection::load (ESM::ESMReader& reader, bool base, const ESM::Dialogue& dialogue)
{
std::string id = Misc::StringUtils::lowerCase (dialogue.mId) + "#" +
reader.getHNOString ("INAM");
Info info;
info.load (reader);
std::string id = Misc::StringUtils::lowerCase (dialogue.mId) + "#" + info.mId;
if (reader.isNextSub ("DELE"))
if (info.mIsDeleted)
{
int index = searchId (id);
reader.skipRecord();
if (index==-1)
{
// deleting a record that does not exist
// ignore it for now
/// \todo report the problem to the user
}
else if (base)
@ -137,12 +134,9 @@ void CSMWorld::InfoCollection::load (ESM::ESMReader& reader, bool base, const ES
}
else
{
Info record;
record.mTopicId = dialogue.mId;
record.mId = id;
record.load (reader);
load (record, base);
info.mTopicId = dialogue.mId;
info.mId = id;
load (info, base);
}
}