1 #ifndef GAME_MWMECHANICS_NPCSTATS_H
2 #define GAME_MWMECHANICS_NPCSTATS_H
66 void raiseRank(
const std::string& faction);
68 void lowerRank(
const std::string& faction);
73 bool getExpelled(
const std::string& factionID)
const;
74 void expell(
const std::string& factionID);
77 bool isInFaction (
const std::string& faction)
const;
81 void useSkill (
int skillIndex,
const ESM::Class& class_,
int usageType = -1,
float extraFactor=1.f);
void setBaseDisposition(int disposition)
Definition: npcstats.cpp:45
int mReputation
Definition: npcstats.hpp:26
void addWerewolfKill()
Increments mWerewolfKills by 1.
Definition: npcstats.cpp:433
int getWerewolfKills() const
Definition: npcstats.cpp:428
std::set< std::string > mExpelled
Definition: npcstats.hpp:34
int getCrimeId() const
Definition: npcstats.cpp:367
void increaseSkill(int skillIndex, const ESM::Class &class_, bool preserveProgress)
Definition: npcstats.cpp:224
int getLevelupAttributeMultiplier(int attribute) const
Definition: npcstats.cpp:316
void setCrimeId(int id)
Definition: npcstats.cpp:372
NpcStats()
Definition: npcstats.cpp:26
int mDisposition
Definition: npcstats.hpp:23
void useSkill(int skillIndex, const ESM::Class &class_, int usageType=-1, float extraFactor=1.f)
Increase skill by usage.
Definition: npcstats.cpp:198
float mTimeToStartDrowning
Countdown to getting damage while underwater.
Definition: npcstats.hpp:43
Common creature stats.
Definition: creaturestats.hpp:25
float getTimeToStartDrowning() const
Definition: npcstats.cpp:438
void levelUp()
Definition: npcstats.cpp:287
Definition: loadskil.hpp:74
int getBaseDisposition() const
Definition: npcstats.cpp:40
void lowerRank(const std::string &faction)
Lower the rank in this faction by 1, if such a rank exists.
Definition: npcstats.cpp:92
void flagAsUsed(const std::string &id)
Definition: npcstats.cpp:337
std::map< std::string, int > mFactionReputation
Definition: npcstats.hpp:35
void setSkill(int index, const SkillValue &value)
Definition: npcstats.cpp:66
bool hasBeenUsed(const std::string &id) const
Definition: npcstats.cpp:342
void setWerewolf(bool set)
Definition: npcstats.cpp:416
std::map< std::string, int > mFactionRank
Used for the player only; NPCs have maximum one faction defined in their NPC record.
Definition: npcstats.hpp:33
const std::set< std::string > & getExpelled() const
Definition: npcstats.hpp:72
std::vector< int > mSkillIncreases
Definition: npcstats.hpp:37
void expell(const std::string &factionID)
Definition: npcstats.cpp:115
void writeState(ESM::NpcStats &state) const
Definition: npcstats.cpp:448
void joinFaction(const std::string &faction)
Join this faction, setting the initial rank to 0.
Definition: npcstats.cpp:102
bool isWerewolf() const
Definition: npcstats.cpp:411
void updateHealth()
Definition: npcstats.cpp:308
bool hasSkillsForRank(const std::string &factionId, int rank) const
Definition: npcstats.cpp:377
void readState(const ESM::NpcStats &state)
Definition: npcstats.cpp:488
int getSkillIncreasesForSpecialization(int spec) const
Definition: npcstats.cpp:332
bool isInFaction(const std::string &faction) const
Definition: npcstats.cpp:132
void setBounty(int bounty)
Definition: npcstats.cpp:352
const std::map< std::string, int > & getFactionRanks() const
Definition: npcstats.cpp:74
int getLevelProgress() const
Definition: npcstats.cpp:282
void clearExpelled(const std::string &factionID)
Definition: npcstats.cpp:127
Additional stats for NPCs.
Definition: npcstats.hpp:21
std::vector< int > mSpecIncreases
Definition: npcstats.hpp:38
int getReputation() const
Definition: npcstats.cpp:357
int mLevelProgress
Definition: npcstats.hpp:36
Definition: loadclas.hpp:18
std::set< std::string > mUsedIds
Definition: npcstats.hpp:39
int getBounty() const
Definition: npcstats.cpp:347
void raiseRank(const std::string &faction)
Increase the rank in this faction by 1, if such a rank exists.
Definition: npcstats.cpp:79
SkillValue mSkill[ESM::Skill::Length]
Definition: npcstats.hpp:24
void setTimeToStartDrowning(float time)
Definition: npcstats.cpp:443
const SkillValue & getSkill(int index) const
Definition: npcstats.cpp:50
int getFactionReputation(const std::string &faction) const
Definition: npcstats.cpp:137
Definition: npcstats.hpp:17
void setReputation(int reputation)
Definition: npcstats.cpp:362
bool mIsWerewolf
Definition: npcstats.hpp:45
int mCrimeId
Definition: npcstats.hpp:27
int mWerewolfKills
Definition: npcstats.hpp:31
int mBounty
Definition: npcstats.hpp:30
void setFactionReputation(const std::string &faction, int value)
Definition: npcstats.cpp:147
float getSkillProgressRequirement(int skillIndex, const ESM::Class &class_) const
Definition: npcstats.cpp:152