2014-02-01 16:36:23 +00:00
|
|
|
#include "creaturestate.hpp"
|
|
|
|
|
2022-04-11 22:18:39 +00:00
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
|
|
|
|
void CreatureState::load(ESMReader& esm)
|
2015-01-19 22:29:06 +00:00
|
|
|
{
|
|
|
|
ObjectState::load(esm);
|
2014-02-16 14:56:36 +00:00
|
|
|
|
2015-01-19 22:29:06 +00:00
|
|
|
if (mHasCustomState)
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2015-01-19 22:29:06 +00:00
|
|
|
mInventory.load(esm);
|
2014-02-01 16:36:23 +00:00
|
|
|
|
2022-04-11 22:18:39 +00:00
|
|
|
mCreatureStats.load(esm);
|
2022-09-22 18:26:05 +00:00
|
|
|
}
|
|
|
|
}
|
2014-02-01 16:36:23 +00:00
|
|
|
|
2015-01-19 22:29:06 +00:00
|
|
|
void CreatureState::save(ESMWriter& esm, bool inInventory) const
|
|
|
|
{
|
|
|
|
ObjectState::save(esm, inInventory);
|
2014-02-16 14:56:36 +00:00
|
|
|
|
2015-01-19 22:29:06 +00:00
|
|
|
if (mHasCustomState)
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2014-02-01 16:36:23 +00:00
|
|
|
mInventory.save(esm);
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2015-01-19 22:29:06 +00:00
|
|
|
mCreatureStats.save(esm);
|
2022-09-22 18:26:05 +00:00
|
|
|
}
|
2015-01-19 22:29:06 +00:00
|
|
|
}
|
2015-01-18 18:59:29 +00:00
|
|
|
|
2022-04-11 22:18:39 +00:00
|
|
|
void CreatureState::blank()
|
2015-01-18 18:59:29 +00:00
|
|
|
{
|
|
|
|
ObjectState::blank();
|
|
|
|
mCreatureStats.blank();
|
|
|
|
}
|
2022-04-11 22:18:39 +00:00
|
|
|
|
|
|
|
}
|