|
|
|
@ -21,15 +21,15 @@ namespace ESM
|
|
|
|
|
// Requirements for each rank
|
|
|
|
|
struct RankData
|
|
|
|
|
{
|
|
|
|
|
int mAttribute1, mAttribute2; // Attribute level
|
|
|
|
|
int32_t mAttribute1, mAttribute2; // Attribute level
|
|
|
|
|
|
|
|
|
|
// Skill level (faction skills given in
|
|
|
|
|
// skillID below.) You need one skill at
|
|
|
|
|
// level 'mPrimarySkill' and two skills at level
|
|
|
|
|
// 'mFavouredSkill' to advance to this rank.
|
|
|
|
|
int mPrimarySkill, mFavouredSkill;
|
|
|
|
|
int32_t mPrimarySkill, mFavouredSkill;
|
|
|
|
|
|
|
|
|
|
int mFactReaction; // Reaction from faction members
|
|
|
|
|
int32_t mFactReaction; // Reaction from faction members
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct Faction
|
|
|
|
@ -39,33 +39,33 @@ namespace ESM
|
|
|
|
|
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
|
|
|
|
static std::string_view getRecordType() { return "Faction"; }
|
|
|
|
|
|
|
|
|
|
unsigned int mRecordFlags;
|
|
|
|
|
uint32_t mRecordFlags;
|
|
|
|
|
std::string mName;
|
|
|
|
|
RefId mId;
|
|
|
|
|
|
|
|
|
|
struct FADTstruct
|
|
|
|
|
{
|
|
|
|
|
// Which attributes we like
|
|
|
|
|
std::array<int, 2> mAttribute;
|
|
|
|
|
std::array<int32_t, 2> mAttribute;
|
|
|
|
|
|
|
|
|
|
std::array<RankData, 10> mRankData;
|
|
|
|
|
|
|
|
|
|
std::array<int, 7> mSkills; // IDs of skills this faction require
|
|
|
|
|
// Each element will either contain an Skill index, or -1.
|
|
|
|
|
std::array<int32_t, 7> mSkills; // IDs of skills this faction require
|
|
|
|
|
// Each element will either contain an Skill index, or -1.
|
|
|
|
|
|
|
|
|
|
int mIsHidden; // 1 - hidden from player
|
|
|
|
|
int32_t mIsHidden; // 1 - hidden from player
|
|
|
|
|
|
|
|
|
|
int& getSkill(int index, bool ignored = false);
|
|
|
|
|
int32_t& getSkill(size_t index, bool ignored = false);
|
|
|
|
|
///< Throws an exception for invalid values of \a index.
|
|
|
|
|
|
|
|
|
|
int getSkill(int index, bool ignored = false) const;
|
|
|
|
|
int32_t getSkill(size_t index, bool ignored = false) const;
|
|
|
|
|
///< Throws an exception for invalid values of \a index.
|
|
|
|
|
}; // 240 bytes
|
|
|
|
|
|
|
|
|
|
FADTstruct mData;
|
|
|
|
|
|
|
|
|
|
// <Faction ID, Reaction>
|
|
|
|
|
std::map<ESM::RefId, int> mReactions;
|
|
|
|
|
std::map<ESM::RefId, int32_t> mReactions;
|
|
|
|
|
|
|
|
|
|
// Name of faction ranks (may be empty for NPC factions)
|
|
|
|
|
std::array<std::string, 10> mRanks;
|
|
|
|
|