2014-02-01 16:36:23 +00:00
|
|
|
#ifndef OPENMW_ESM_NPCSTATE_H
|
|
|
|
#define OPENMW_ESM_NPCSTATE_H
|
|
|
|
|
|
|
|
#include "objectstate.hpp"
|
|
|
|
#include "inventorystate.hpp"
|
2014-02-16 14:06:34 +00:00
|
|
|
#include "npcstats.hpp"
|
|
|
|
#include "creaturestats.hpp"
|
2014-02-01 16:36:23 +00:00
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
// format 0, saved games only
|
|
|
|
|
2020-06-06 21:00:53 +00:00
|
|
|
struct NpcState final : public ObjectState
|
2014-02-01 16:36:23 +00:00
|
|
|
{
|
|
|
|
InventoryState mInventory;
|
2014-02-16 14:06:34 +00:00
|
|
|
NpcStats mNpcStats;
|
|
|
|
CreatureStats mCreatureStats;
|
2014-02-01 16:36:23 +00:00
|
|
|
|
2015-01-18 18:59:29 +00:00
|
|
|
/// Initialize to default state
|
2020-10-22 21:57:53 +00:00
|
|
|
void blank() override;
|
2015-01-18 18:59:29 +00:00
|
|
|
|
2020-10-22 21:57:53 +00:00
|
|
|
void load (ESMReader &esm) override;
|
|
|
|
void save (ESMWriter &esm, bool inInventory = false) const override;
|
2020-03-17 10:15:19 +00:00
|
|
|
|
2020-10-22 21:57:53 +00:00
|
|
|
NpcState& asNpcState() override
|
2020-03-17 10:15:19 +00:00
|
|
|
{
|
|
|
|
return *this;
|
|
|
|
}
|
2020-10-22 21:57:53 +00:00
|
|
|
const NpcState& asNpcState() const override
|
2020-03-17 10:15:19 +00:00
|
|
|
{
|
|
|
|
return *this;
|
|
|
|
}
|
2014-02-01 16:36:23 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|