|
|
@ -154,20 +154,32 @@ namespace ESM
|
|
|
|
|
|
|
|
|
|
|
|
if (mNpdtType == NPC_DEFAULT)
|
|
|
|
if (mNpdtType == NPC_DEFAULT)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
esm.writeHNT("NPDT", mNpdt, 52);
|
|
|
|
esm.startSubRecord("NPDT");
|
|
|
|
|
|
|
|
esm.writeT(mNpdt.mLevel);
|
|
|
|
|
|
|
|
esm.writeT(mNpdt.mAttributes);
|
|
|
|
|
|
|
|
esm.writeT(mNpdt.mSkills);
|
|
|
|
|
|
|
|
esm.writeT(mNpdt.mUnknown1);
|
|
|
|
|
|
|
|
esm.writeT(mNpdt.mHealth);
|
|
|
|
|
|
|
|
esm.writeT(mNpdt.mMana);
|
|
|
|
|
|
|
|
esm.writeT(mNpdt.mFatigue);
|
|
|
|
|
|
|
|
esm.writeT(mNpdt.mDisposition);
|
|
|
|
|
|
|
|
esm.writeT(mNpdt.mReputation);
|
|
|
|
|
|
|
|
esm.writeT(mNpdt.mRank);
|
|
|
|
|
|
|
|
esm.writeT(mNpdt.mUnknown2);
|
|
|
|
|
|
|
|
esm.writeT(mNpdt.mGold);
|
|
|
|
|
|
|
|
esm.endRecord("NPDT");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (mNpdtType == NPC_WITH_AUTOCALCULATED_STATS)
|
|
|
|
else if (mNpdtType == NPC_WITH_AUTOCALCULATED_STATS)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
NPDTstruct12 npdt12;
|
|
|
|
esm.startSubRecord("NPDT");
|
|
|
|
npdt12.mLevel = mNpdt.mLevel;
|
|
|
|
esm.writeT(mNpdt.mLevel);
|
|
|
|
npdt12.mDisposition = mNpdt.mDisposition;
|
|
|
|
esm.writeT(mNpdt.mDisposition);
|
|
|
|
npdt12.mReputation = mNpdt.mReputation;
|
|
|
|
esm.writeT(mNpdt.mReputation);
|
|
|
|
npdt12.mRank = mNpdt.mRank;
|
|
|
|
esm.writeT(mNpdt.mRank);
|
|
|
|
npdt12.mUnknown1 = 0;
|
|
|
|
constexpr char padding[] = { 0, 0, 0 };
|
|
|
|
npdt12.mUnknown2 = 0;
|
|
|
|
esm.writeT(padding);
|
|
|
|
npdt12.mUnknown3 = 0;
|
|
|
|
esm.writeT(mNpdt.mGold);
|
|
|
|
npdt12.mGold = mNpdt.mGold;
|
|
|
|
esm.endRecord("NPDT");
|
|
|
|
esm.writeHNT("NPDT", npdt12, 12);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
esm.writeHNT("FLAG", ((mBloodType << 10) + mFlags));
|
|
|
|
esm.writeHNT("FLAG", ((mBloodType << 10) + mFlags));
|
|
|
|