2014-01-23 10:29:40 +00:00
|
|
|
#include "cellstate.hpp"
|
|
|
|
|
|
|
|
#include "esmreader.hpp"
|
|
|
|
#include "esmwriter.hpp"
|
|
|
|
|
|
|
|
void ESM::CellState::load (ESMReader &esm)
|
|
|
|
{
|
|
|
|
mWaterLevel = 0;
|
|
|
|
esm.getHNOT (mWaterLevel, "WLVL");
|
2014-05-11 00:07:28 +00:00
|
|
|
|
|
|
|
mHasFogOfWar = false;
|
|
|
|
esm.getHNOT (mHasFogOfWar, "HFOW");
|
2014-05-17 07:05:41 +00:00
|
|
|
|
|
|
|
mLastRespawn.mDay = 0;
|
|
|
|
mLastRespawn.mHour = 0;
|
|
|
|
esm.getHNOT (mLastRespawn, "RESP");
|
2014-01-23 10:29:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void ESM::CellState::save (ESMWriter &esm) const
|
|
|
|
{
|
|
|
|
if (!mId.mPaged)
|
|
|
|
esm.writeHNT ("WLVL", mWaterLevel);
|
2014-05-11 00:07:28 +00:00
|
|
|
|
2014-05-17 07:05:41 +00:00
|
|
|
esm.writeHNT ("HFOW", mHasFogOfWar);
|
|
|
|
|
|
|
|
esm.writeHNT ("RESP", mLastRespawn);
|
2014-05-11 00:07:28 +00:00
|
|
|
}
|