You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw/components/esm3/npcstate.cpp

43 lines
726 B
C++

#include "npcstate.hpp"
namespace ESM
{
void NpcState::load(ESMReader& esm)
{
ObjectState::load(esm);
if (mHasCustomState)
{
mInventory.load(esm);
mNpcStats.load(esm);
mCreatureStats.load(esm);
}
}
void NpcState::save(ESMWriter& esm, bool inInventory) const
{
ObjectState::save(esm, inInventory);
if (mHasCustomState)
{
mInventory.save(esm);
mNpcStats.save(esm);
mCreatureStats.save(esm);
}
}
void NpcState::blank()
{
ObjectState::blank();
mNpcStats.blank();
mCreatureStats.blank();
mHasCustomState = true;
}
}