1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

ESSImport: convert TalkedTo flag and gold pool

This commit is contained in:
scrawl 2015-01-20 20:19:08 +01:00
parent e38d756345
commit 142a138b75
3 changed files with 14 additions and 6 deletions

View file

@ -27,6 +27,8 @@ namespace ESSImport
cStats.mAttributes[i].mMod = acdt.mAttributes[i][0];
cStats.mAttributes[i].mCurrent = acdt.mAttributes[i][0];
}
cStats.mGoldPool = acdt.mGoldPool;
cStats.mTalkedTo = acdt.mFlags & TalkedToPlayer;
}
void convertNpcData (const ActorData& actorData, ESM::NpcStats& npcStats)

View file

@ -22,7 +22,7 @@ namespace ESSImport
ESM::CellRef bla;
bla.ESM::CellRef::loadData(esm);
// FIXME: actually should be required for all actors?, but ActorData is currently in base CellRef
// FIXME: not all actors have this, add flag
esm.getHNOT(mACDT, "ACDT");
ACSC acsc;
@ -76,6 +76,7 @@ namespace ESSImport
esm.skipHSub(); // 4 byte, 0
}
// FIXME: not all actors have this, add flag
if (esm.isNextSub("CHRD")) // npc only
esm.getHExact(mSkills, 27*2*sizeof(int));

View file

@ -11,6 +11,10 @@ namespace ESM
namespace ESSImport
{
enum ACDTFlags
{
TalkedToPlayer = 0x4
};
/// Actor data, shared by (at least) REFR and CellRef
#pragma pack(push)
@ -19,16 +23,17 @@ namespace ESSImport
{
// Note, not stored at *all*:
// - Level changes are lost on reload, except for the player (there it's in the NPC record).
unsigned char mUnknown1[16];
unsigned char mUnknown[12];
unsigned char mFlags; // ACDTFlags
unsigned char mUnknown1[3];
float mBreathMeter; // Seconds left before drowning
unsigned char mUnknown2[20];
float mDynamic[3][2];
unsigned char mUnknown3[16];
float mAttributes[8][2];
unsigned char mUnknown4[109];
// This seems to increase when purchasing training, though I don't see it anywhere ingame.
int mGold;
unsigned char mUnknown5[7];
unsigned char mUnknown4[112];
unsigned int mGoldPool;
unsigned char mUnknown5[4];
};
#pragma pack(pop)