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