1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-10 21:40:15 +00:00
OpenMW/components/esm3/creaturestate.cpp

37 lines
619 B
C++
Raw Normal View History

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