2014-05-14 22:23:53 +00:00
|
|
|
#include "creaturelevliststate.hpp"
|
|
|
|
|
|
|
|
#include "esmreader.hpp"
|
|
|
|
#include "esmwriter.hpp"
|
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
|
|
|
|
void CreatureLevListState::load(ESMReader& esm)
|
|
|
|
{
|
|
|
|
ObjectState::load(esm);
|
|
|
|
|
|
|
|
mSpawnActorId = -1;
|
|
|
|
esm.getHNOT(mSpawnActorId, "SPAW");
|
2014-05-17 07:05:41 +00:00
|
|
|
|
|
|
|
mSpawn = false;
|
|
|
|
esm.getHNOT(mSpawn, "RESP");
|
2014-05-14 22:23:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void CreatureLevListState::save(ESMWriter& esm, bool inInventory) const
|
|
|
|
{
|
|
|
|
ObjectState::save(esm, inInventory);
|
|
|
|
|
|
|
|
if (mSpawnActorId != -1)
|
|
|
|
esm.writeHNT("SPAW", mSpawnActorId);
|
2014-05-17 07:05:41 +00:00
|
|
|
|
|
|
|
if (mSpawn)
|
|
|
|
esm.writeHNT("RESP", mSpawn);
|
2014-05-14 22:23:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|