2015-01-18 23:35:19 +00:00
|
|
|
#include "custommarkerstate.hpp"
|
|
|
|
|
|
|
|
#include "esmreader.hpp"
|
|
|
|
#include "esmwriter.hpp"
|
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
|
2022-04-11 22:18:39 +00:00
|
|
|
void CustomMarker::save(ESMWriter& esm) const
|
2015-01-18 23:35:19 +00:00
|
|
|
{
|
|
|
|
esm.writeHNT("POSX", mWorldX);
|
|
|
|
esm.writeHNT("POSY", mWorldY);
|
2023-02-19 16:42:37 +00:00
|
|
|
mCellId.save(esm);
|
2015-01-18 23:35:19 +00:00
|
|
|
if (!mNote.empty())
|
|
|
|
esm.writeHNString("NOTE", mNote);
|
|
|
|
}
|
|
|
|
|
2022-04-11 22:18:39 +00:00
|
|
|
void CustomMarker::load(ESMReader& esm)
|
2015-01-18 23:35:19 +00:00
|
|
|
{
|
|
|
|
esm.getHNT(mWorldX, "POSX");
|
|
|
|
esm.getHNT(mWorldY, "POSY");
|
2023-02-19 16:42:37 +00:00
|
|
|
mCellId.load(esm);
|
|
|
|
mCell = mCellId.getCellRefId();
|
2015-01-18 23:35:19 +00:00
|
|
|
mNote = esm.getHNOString("NOTE");
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|