forked from mirror/openmw-tes3mp
ESSImport: fix NPCC indices
This commit is contained in:
parent
5b705196bc
commit
e38d756345
3 changed files with 8 additions and 6 deletions
|
@ -1,5 +1,7 @@
|
||||||
#include "converter.hpp"
|
#include "converter.hpp"
|
||||||
|
|
||||||
|
#include <stdexcept>
|
||||||
|
|
||||||
#include <OgreImage.h>
|
#include <OgreImage.h>
|
||||||
|
|
||||||
#include <components/esm/creaturestate.hpp>
|
#include <components/esm/creaturestate.hpp>
|
||||||
|
@ -281,7 +283,9 @@ namespace ESSImport
|
||||||
continue;
|
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
|
else
|
||||||
{
|
{
|
||||||
int index = mIndexCounter[id]++;
|
int index = npcc.mNPDT.mIndex;
|
||||||
mContext->mNpcChanges.insert(std::make_pair(std::make_pair(index,id), npcc)).second;
|
mContext->mNpcChanges.insert(std::make_pair(std::make_pair(index,id), npcc)).second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
|
||||||
std::map<std::string, int> mIndexCounter;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ConvertREFR : public Converter
|
class ConvertREFR : public Converter
|
||||||
|
|
|
@ -22,7 +22,8 @@ namespace ESSImport
|
||||||
unsigned char mDisposition;
|
unsigned char mDisposition;
|
||||||
unsigned char unknown;
|
unsigned char unknown;
|
||||||
unsigned char mReputation;
|
unsigned char mReputation;
|
||||||
unsigned char unknown2[5];
|
unsigned char unknown2;
|
||||||
|
int mIndex;
|
||||||
} mNPDT;
|
} mNPDT;
|
||||||
|
|
||||||
Inventory mInventory;
|
Inventory mInventory;
|
||||||
|
|
Loading…
Reference in a new issue