1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 07:53:51 +00:00

cleaned up ID handling in INFO record (including a ESMTool bug fix)

This commit is contained in:
Marc Zinnschlag 2013-11-05 12:56:20 +01:00
parent 9d7695ea88
commit 2d4a6c0edf
5 changed files with 6 additions and 3 deletions

View file

@ -339,6 +339,8 @@ int load(Arguments& info)
} }
std::string id = esm.getHNOString("NAME"); std::string id = esm.getHNOString("NAME");
if (id.empty())
id = esm.getHNOString("INAM");
if(!quiet && interested) if(!quiet && interested)
std::cout << "\nRecord: " << n.toString() std::cout << "\nRecord: " << n.toString()

View file

@ -35,7 +35,7 @@ void CSMWorld::InfoCollection::load (ESM::ESMReader& reader, bool base, const ES
{ {
/// \todo put records into proper order /// \todo put records into proper order
/// \todo adjust ID /// \todo adjust ID
std::string id = reader.getHNOString ("NAME"); std::string id = reader.getHNOString ("INAM");
if (reader.isNextSub ("DELE")) if (reader.isNextSub ("DELE"))
{ {

View file

@ -70,8 +70,10 @@ void ESMStore::load(ESM::ESMReader &esm, Loading::Listener* listener)
if (it == mStores.end()) { if (it == mStores.end()) {
if (n.val == ESM::REC_INFO) { if (n.val == ESM::REC_INFO) {
std::string id = esm.getHNOString("INAM");
if (dialogue) { if (dialogue) {
dialogue->mInfo.push_back(ESM::DialInfo()); dialogue->mInfo.push_back(ESM::DialInfo());
dialogue->mInfo.back().mId = id;
dialogue->mInfo.back().load(esm); dialogue->mInfo.back().load(esm);
} else { } else {
std::cerr << "error: info record without dialog" << std::endl; std::cerr << "error: info record without dialog" << std::endl;

View file

@ -8,7 +8,6 @@ namespace ESM
void DialInfo::load(ESMReader &esm) void DialInfo::load(ESMReader &esm)
{ {
mId = esm.getHNString("INAM");
mPrev = esm.getHNString("PNAM"); mPrev = esm.getHNString("PNAM");
mNext = esm.getHNString("NNAM"); mNext = esm.getHNString("NNAM");