2014-02-16 14:56:36 +00:00
|
|
|
#ifndef OPENMW_ESM_CREATURESTATS_H
|
|
|
|
#define OPENMW_ESM_CREATURESTATS_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
#include "statstate.hpp"
|
|
|
|
|
2014-05-12 19:04:02 +00:00
|
|
|
#include "defs.hpp"
|
|
|
|
|
|
|
|
#include "spellstate.hpp"
|
2014-05-14 20:16:39 +00:00
|
|
|
#include "activespells.hpp"
|
2014-08-17 02:58:58 +00:00
|
|
|
#include "magiceffects.hpp"
|
2014-06-12 21:27:04 +00:00
|
|
|
#include "aisequence.hpp"
|
2014-05-12 19:04:02 +00:00
|
|
|
|
2014-02-16 14:56:36 +00:00
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
class ESMReader;
|
|
|
|
class ESMWriter;
|
|
|
|
|
|
|
|
// format 0, saved games only
|
|
|
|
struct CreatureStats
|
|
|
|
{
|
|
|
|
StatState<int> mAttributes[8];
|
|
|
|
StatState<float> mDynamic[3];
|
|
|
|
|
2014-08-17 02:58:58 +00:00
|
|
|
MagicEffects mMagicEffects;
|
|
|
|
|
2014-06-12 21:27:04 +00:00
|
|
|
AiSequence::AiSequence mAiSequence;
|
|
|
|
|
2014-06-15 19:19:37 +00:00
|
|
|
bool mHasAiSettings;
|
|
|
|
StatState<int> mAiSettings[4];
|
|
|
|
|
2015-01-05 17:52:37 +00:00
|
|
|
std::map<std::pair<int, std::string>, int> mSummonedCreatureMap;
|
2014-06-15 19:19:37 +00:00
|
|
|
std::vector<int> mSummonGraveyard;
|
|
|
|
|
2014-05-12 19:04:02 +00:00
|
|
|
ESM::TimeStamp mTradeTime;
|
|
|
|
int mGoldPool;
|
2014-05-14 07:47:49 +00:00
|
|
|
int mActorId;
|
2017-02-06 12:32:36 +00:00
|
|
|
int mHitAttemptActorId;
|
2014-05-12 19:04:02 +00:00
|
|
|
|
|
|
|
bool mDead;
|
2016-06-11 22:04:50 +00:00
|
|
|
bool mDeathAnimationFinished;
|
2014-05-12 19:04:02 +00:00
|
|
|
bool mDied;
|
2014-06-17 01:54:41 +00:00
|
|
|
bool mMurdered;
|
2014-05-12 19:04:02 +00:00
|
|
|
bool mTalkedTo;
|
|
|
|
bool mAlarmed;
|
|
|
|
bool mAttacked;
|
|
|
|
bool mKnockdown;
|
|
|
|
bool mKnockdownOneFrame;
|
|
|
|
bool mKnockdownOverOneFrame;
|
|
|
|
bool mHitRecovery;
|
|
|
|
bool mBlock;
|
|
|
|
unsigned int mMovementFlags;
|
|
|
|
float mFallHeight;
|
|
|
|
std::string mLastHitObject;
|
2014-12-11 21:25:41 +00:00
|
|
|
std::string mLastHitAttemptObject;
|
2014-05-12 19:04:02 +00:00
|
|
|
bool mRecalcDynamicStats;
|
|
|
|
int mDrawState;
|
2016-05-19 19:37:24 +00:00
|
|
|
signed char mDeathAnimation;
|
2016-02-27 11:53:07 +00:00
|
|
|
ESM::TimeStamp mTimeOfDeath;
|
2014-05-12 19:04:02 +00:00
|
|
|
|
|
|
|
int mLevel;
|
|
|
|
|
|
|
|
SpellState mSpells;
|
2014-05-14 20:16:39 +00:00
|
|
|
ActiveSpells mActiveSpells;
|
2014-05-12 19:04:02 +00:00
|
|
|
|
2015-01-18 18:59:29 +00:00
|
|
|
/// Initialize to default state
|
|
|
|
void blank();
|
|
|
|
|
2014-02-16 14:56:36 +00:00
|
|
|
void load (ESMReader &esm);
|
|
|
|
void save (ESMWriter &esm) const;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2014-05-12 19:04:02 +00:00
|
|
|
#endif
|