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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
726 B
C++
Raw Normal View History

#include "npcstate.hpp"
namespace ESM
{
void NpcState::load(ESMReader& esm)
{
ObjectState::load(esm);
2014-02-16 14:06:34 +00:00
if (mHasCustomState)
2022-09-22 18:26:05 +00:00
{
mInventory.load(esm);
2014-02-16 14:06:34 +00:00
mNpcStats.load(esm);
mCreatureStats.load(esm);
2022-09-22 18:26:05 +00:00
}
}
void NpcState::save(ESMWriter& esm, bool inInventory) const
{
ObjectState::save(esm, inInventory);
2014-02-16 14:06:34 +00:00
if (mHasCustomState)
2022-09-22 18:26:05 +00:00
{
mInventory.save(esm);
2014-02-16 14:06:34 +00:00
mNpcStats.save(esm);
2022-09-22 18:26:05 +00:00
mCreatureStats.save(esm);
2022-09-22 18:26:05 +00:00
}
}
void NpcState::blank()
{
ObjectState::blank();
mNpcStats.blank();
mCreatureStats.blank();
mHasCustomState = true;
}
}