1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 18:29:55 +00:00
openmw/components/esm3/creaturestate.cpp

37 lines
619 B
C++
Raw Normal View History

#include "creaturestate.hpp"
namespace ESM
{
2022-09-22 18:26:05 +00:00
void CreatureState::load(ESMReader& esm)
{
2022-09-22 18:26:05 +00:00
ObjectState::load(esm);
2022-09-22 18:26:05 +00:00
if (mHasCustomState)
{
mInventory.load(esm);
2022-09-22 18:26:05 +00:00
mCreatureStats.load(esm);
}
}
2022-09-22 18:26:05 +00:00
void CreatureState::save(ESMWriter& esm, bool inInventory) const
{
2022-09-22 18:26:05 +00:00
ObjectState::save(esm, inInventory);
2022-09-22 18:26:05 +00:00
if (mHasCustomState)
{
mInventory.save(esm);
mCreatureStats.save(esm);
}
}
2022-09-22 18:26:05 +00:00
void CreatureState::blank()
{
ObjectState::blank();
mCreatureStats.blank();
}
}