2013-12-15 15:16:50 +00:00
|
|
|
#include "globalscript.hpp"
|
|
|
|
|
|
|
|
#include "esmreader.hpp"
|
|
|
|
#include "esmwriter.hpp"
|
|
|
|
|
|
|
|
void ESM::GlobalScript::load (ESMReader &esm)
|
|
|
|
{
|
|
|
|
mId = esm.getHNString ("NAME");
|
|
|
|
|
|
|
|
mLocals.load (esm);
|
|
|
|
|
|
|
|
mRunning = 0;
|
|
|
|
esm.getHNOT (mRunning, "RUN_");
|
2014-07-15 11:05:38 +00:00
|
|
|
|
|
|
|
mTargetId = esm.getHNOString ("TARG");
|
2013-12-15 15:16:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void ESM::GlobalScript::save (ESMWriter &esm) const
|
|
|
|
{
|
|
|
|
esm.writeHNString ("NAME", mId);
|
|
|
|
|
|
|
|
mLocals.save (esm);
|
|
|
|
|
|
|
|
if (mRunning)
|
|
|
|
esm.writeHNT ("RUN_", mRunning);
|
2014-07-15 11:05:38 +00:00
|
|
|
|
|
|
|
esm.writeHNOString ("TARG", mTargetId);
|
2015-03-11 14:54:45 +00:00
|
|
|
}
|