2014-02-01 17:36:23 +01:00
|
|
|
#ifndef OPENMW_ESM_CREATURESTATE_H
|
|
|
|
#define OPENMW_ESM_CREATURESTATE_H
|
|
|
|
|
|
|
|
#include "objectstate.hpp"
|
|
|
|
#include "inventorystate.hpp"
|
2014-02-16 15:56:36 +01:00
|
|
|
#include "creaturestats.hpp"
|
2014-02-01 17:36:23 +01:00
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
// format 0, saved games only
|
|
|
|
|
|
|
|
struct CreatureState : public ObjectState
|
|
|
|
{
|
|
|
|
InventoryState mInventory;
|
2014-02-16 15:56:36 +01:00
|
|
|
CreatureStats mCreatureStats;
|
2014-02-01 17:36:23 +01:00
|
|
|
|
2015-01-18 19:59:29 +01:00
|
|
|
/// Initialize to default state
|
|
|
|
void blank();
|
|
|
|
|
2014-02-01 17:36:23 +01:00
|
|
|
virtual void load (ESMReader &esm);
|
|
|
|
virtual void save (ESMWriter &esm, bool inInventory = false) const;
|
2020-03-17 14:15:19 +04:00
|
|
|
|
|
|
|
virtual CreatureState& asCreatureState()
|
|
|
|
{
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
virtual const CreatureState& asCreatureState() const
|
|
|
|
{
|
|
|
|
return *this;
|
|
|
|
}
|
2014-02-01 17:36:23 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|