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

actorid
Marc Zinnschlag 11 years ago
parent 9d7695ea88
commit 2d4a6c0edf

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

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

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

@ -258,7 +258,7 @@ namespace MWWorld
typename std::vector<T *>::iterator sharedIter = mShared.begin();
typename std::vector<T *>::iterator end = sharedIter + mStatic.size();
while (sharedIter != mShared.end() && sharedIter != end) {
while (sharedIter != mShared.end() && sharedIter != end) {
if((*sharedIter)->mId == item.mId) {
mShared.erase(sharedIter);
break;

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

Loading…
Cancel
Save