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
|
|
|
|
|
2020-06-06 23:00:53 +02:00
|
|
|
struct CreatureState final : public ObjectState
|
2014-02-01 17:36:23 +01:00
|
|
|
{
|
|
|
|
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
|
2020-10-22 23:57:53 +02:00
|
|
|
void blank() override;
|
2015-01-18 19:59:29 +01:00
|
|
|
|
2020-10-22 23:57:53 +02:00
|
|
|
void load (ESMReader &esm) override;
|
|
|
|
void save (ESMWriter &esm, bool inInventory = false) const override;
|
2020-03-17 14:15:19 +04:00
|
|
|
|
2020-10-22 23:57:53 +02:00
|
|
|
CreatureState& asCreatureState() override
|
2020-03-17 14:15:19 +04:00
|
|
|
{
|
|
|
|
return *this;
|
|
|
|
}
|
2020-10-22 23:57:53 +02:00
|
|
|
const CreatureState& asCreatureState() const override
|
2020-03-17 14:15:19 +04:00
|
|
|
{
|
|
|
|
return *this;
|
|
|
|
}
|
2014-02-01 17:36:23 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|