parent
9b67fcc4d7
commit
471bbd0021
@ -0,0 +1,25 @@
|
||||
#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");
|
||||
}
|
||||
|
||||
void CreatureLevListState::save(ESMWriter &esm, bool inInventory) const
|
||||
{
|
||||
ObjectState::save(esm, inInventory);
|
||||
|
||||
if (mSpawnActorId != -1)
|
||||
esm.writeHNT ("SPAW", mSpawnActorId);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
#ifndef OPENMW_ESM_CREATURELEVLISTSTATE_H
|
||||
#define OPENMW_ESM_CREATURELEVLISTSTATE_H
|
||||
|
||||
#include "objectstate.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
// format 0, saved games only
|
||||
|
||||
struct CreatureLevListState : public ObjectState
|
||||
{
|
||||
int mSpawnActorId;
|
||||
|
||||
virtual void load (ESMReader &esm);
|
||||
virtual void save (ESMWriter &esm, bool inInventory = false) const;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue