1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 17:19:56 +00:00
openmw-tes3mp/components/esm/globalscript.cpp
2014-07-15 13:05:38 +02:00

29 lines
No EOL
514 B
C++

#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_");
mTargetId = esm.getHNOString ("TARG");
}
void ESM::GlobalScript::save (ESMWriter &esm) const
{
esm.writeHNString ("NAME", mId);
mLocals.save (esm);
if (mRunning)
esm.writeHNT ("RUN_", mRunning);
esm.writeHNOString ("TARG", mTargetId);
}