2010-08-19 10:49:13 +00:00
|
|
|
#ifndef GAME_MWMECHANICS_NPCSTATS_H
|
|
|
|
#define GAME_MWMECHANICS_NPCSTATS_H
|
|
|
|
|
|
|
|
#include <map>
|
2012-04-07 16:37:41 +00:00
|
|
|
#include <set>
|
2012-07-06 13:50:26 +00:00
|
|
|
#include <string>
|
2010-08-19 10:49:13 +00:00
|
|
|
|
2010-09-16 08:45:08 +00:00
|
|
|
#include "stat.hpp"
|
2012-04-08 10:25:33 +00:00
|
|
|
#include "drawstate.hpp"
|
2010-09-16 08:45:08 +00:00
|
|
|
|
2010-08-19 10:49:13 +00:00
|
|
|
namespace MWMechanics
|
|
|
|
{
|
|
|
|
/// \brief Additional stats for NPCs
|
|
|
|
///
|
|
|
|
/// For non-NPC-specific stats, see the CreatureStats struct.
|
2012-04-11 17:45:56 +00:00
|
|
|
///
|
2012-04-13 08:49:45 +00:00
|
|
|
/// \note For technical reasons the spell list and the currently selected spell is also handled by
|
|
|
|
/// CreatureStats, even though they are actually NPC stats.
|
2010-08-19 10:49:13 +00:00
|
|
|
|
2012-07-06 13:50:26 +00:00
|
|
|
class NpcStats
|
2010-08-19 10:49:13 +00:00
|
|
|
{
|
2012-07-06 13:50:26 +00:00
|
|
|
public:
|
|
|
|
|
2012-07-06 16:23:48 +00:00
|
|
|
enum Flag
|
|
|
|
{
|
|
|
|
Flag_ForceRun = 1,
|
|
|
|
Flag_ForceSneak = 2,
|
|
|
|
Flag_Run = 4,
|
|
|
|
Flag_Sneak = 8
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
2010-09-16 08:45:08 +00:00
|
|
|
|
2012-07-06 16:23:48 +00:00
|
|
|
/// NPCs other than the player can only have one faction. But for the sake of consistency
|
|
|
|
/// we use the same data structure for the PC and the NPCs.
|
|
|
|
/// \note the faction key must be in lowercase
|
|
|
|
std::map<std::string, int> mFactionRank;
|
2011-01-18 09:45:29 +00:00
|
|
|
|
2012-07-06 16:23:48 +00:00
|
|
|
DrawState mDrawState;
|
|
|
|
unsigned int mMovementFlags;
|
|
|
|
Stat<float> mSkill[27];
|
|
|
|
|
|
|
|
public:
|
2011-01-18 09:45:29 +00:00
|
|
|
|
2012-07-06 13:50:26 +00:00
|
|
|
NpcStats();
|
|
|
|
|
|
|
|
DrawState getDrawState() const;
|
|
|
|
|
|
|
|
void setDrawState (DrawState state);
|
2012-07-06 16:23:48 +00:00
|
|
|
|
|
|
|
bool getMovementFlag (Flag flag) const;
|
|
|
|
|
|
|
|
void setMovementFlag (Flag flag, bool state);
|
|
|
|
|
|
|
|
const Stat<float>& getSkill (int index) const;
|
|
|
|
|
|
|
|
Stat<float>& getSkill (int index);
|
|
|
|
|
|
|
|
std::map<std::string, int>& getFactionRanks();
|
|
|
|
|
|
|
|
const std::map<std::string, int>& getFactionRanks() const;
|
2010-08-19 10:49:13 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|