ESSImport: fix NPCC indices

openmw-35
scrawl 10 years ago
parent 5b705196bc
commit e38d756345

@ -1,5 +1,7 @@
#include "converter.hpp"
#include <stdexcept>
#include <OgreImage.h>
#include <components/esm/creaturestate.hpp>
@ -281,7 +283,9 @@ namespace ESSImport
continue;
}
std::cerr << "Can't find type for " << cellref.mIndexedRefId << std::endl;
std::stringstream error;
error << "Can't find type for " << cellref.mIndexedRefId << std::endl;
throw std::runtime_error(error.str());
}
}

@ -170,13 +170,10 @@ public:
}
else
{
int index = mIndexCounter[id]++;
int index = npcc.mNPDT.mIndex;
mContext->mNpcChanges.insert(std::make_pair(std::make_pair(index,id), npcc)).second;
}
}
private:
std::map<std::string, int> mIndexCounter;
};
class ConvertREFR : public Converter

@ -22,7 +22,8 @@ namespace ESSImport
unsigned char mDisposition;
unsigned char unknown;
unsigned char mReputation;
unsigned char unknown2[5];
unsigned char unknown2;
int mIndex;
} mNPDT;
Inventory mInventory;

Loading…
Cancel
Save