mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
loadnpc is still unfinished, bodypartcheck.cpp mFlags check fix
This commit is contained in:
parent
ccca6db865
commit
8bce460f34
@ -33,7 +33,7 @@ void CSMTools::BodyPartCheckStage::perform ( int stage, Messages &messages )
|
||||
if ( bodyPart.mData.mVampire < 0 )
|
||||
messages.push_back(std::make_pair( id, bodyPart.mId + " has negative vampire flag." ));
|
||||
|
||||
if ( bodyPart.mData.mFlags < 0 || bodyPart.mData.mFlags > 2 )
|
||||
if ( bodyPart.mData.mFlags < 0 || bodyPart.mData.mFlags > 3 )
|
||||
messages.push_back(std::make_pair( id, bodyPart.mId + " has out of range flags value." ));
|
||||
|
||||
if ( bodyPart.mData.mType < 0 || bodyPart.mData.mType > 2 )
|
||||
@ -52,4 +52,4 @@ void CSMTools::BodyPartCheckStage::perform ( int stage, Messages &messages )
|
||||
messages.push_back(std::make_pair( id, bodyPart.mId + " has no race." ));
|
||||
else if ( mRaces.searchId( bodyPart.mRace ) == -1 )
|
||||
messages.push_back(std::make_pair( id, bodyPart.mId + " has invalid race." ));
|
||||
}
|
||||
}
|
||||
|
@ -16,8 +16,8 @@ namespace ESM
|
||||
|
||||
struct AIData
|
||||
{
|
||||
// These are probabilities
|
||||
char mHello, mU1, mFight, mFlee, mAlarm, mU2, mU3, mU4;
|
||||
char mU1, mU2, mU3, mU4; // Unknown values
|
||||
unsigned char mHello, mFight, mFlee, mAlarm; // These are probabilities [0, 100]
|
||||
int mServices; // See the Services enum
|
||||
|
||||
void blank();
|
||||
|
@ -46,7 +46,7 @@ enum PartReferenceType
|
||||
// Reference to body parts
|
||||
struct PartReference
|
||||
{
|
||||
char mPart;
|
||||
unsigned char mPart; // declared values [0, 26]
|
||||
std::string mMale, mFemale;
|
||||
};
|
||||
|
||||
|
@ -49,10 +49,10 @@ struct BodyPart
|
||||
|
||||
struct BYDTstruct
|
||||
{
|
||||
char mPart;
|
||||
char mVampire;
|
||||
char mFlags;
|
||||
char mType;
|
||||
unsigned char mPart; // mesh part
|
||||
unsigned char mVampire; // boolean
|
||||
unsigned char mFlags;
|
||||
unsigned char mType; // mesh type
|
||||
};
|
||||
|
||||
BYDTstruct mData;
|
||||
|
@ -81,9 +81,11 @@ struct NPC
|
||||
mLuck;
|
||||
|
||||
char mSkills[Skill::Length];
|
||||
char mReputation;
|
||||
|
||||
// at opencs/model/tools/referenceablecheck.cpp:679 is assumed that negative reputation values are invalid, can we assume we won't find any negative value?
|
||||
unsigned char mReputation;
|
||||
unsigned short mHealth, mMana, mFatigue;
|
||||
char mDisposition, mFactionID, mRank;
|
||||
signed char mDisposition, mFactionID, mRank;
|
||||
char mUnknown;
|
||||
int mGold;
|
||||
}; // 52 bytes
|
||||
@ -91,7 +93,8 @@ struct NPC
|
||||
struct NPDTstruct12
|
||||
{
|
||||
short mLevel;
|
||||
char mDisposition, mReputation, mRank;
|
||||
unsigned char mReputation; // see NPTDstruct52.mReputation
|
||||
signed char mDisposition, mRank;
|
||||
char mUnknown1, mUnknown2, mUnknown3;
|
||||
int mGold; // ?? not certain
|
||||
}; // 12 bytes
|
||||
@ -103,7 +106,7 @@ struct NPC
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
char mNpdtType;
|
||||
unsigned char mNpdtType;
|
||||
NPDTstruct52 mNpdt52;
|
||||
NPDTstruct12 mNpdt12; //for autocalculated characters
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user