2013-03-22 04:50:54 +00:00
|
|
|
#include "loadprob.hpp"
|
|
|
|
|
|
|
|
#include "esmreader.hpp"
|
|
|
|
#include "esmwriter.hpp"
|
2013-09-24 11:17:28 +00:00
|
|
|
#include "defs.hpp"
|
2013-03-22 04:50:54 +00:00
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
2013-09-24 11:17:28 +00:00
|
|
|
unsigned int Probe::sRecordId = REC_PROB;
|
2013-03-22 04:50:54 +00:00
|
|
|
|
|
|
|
void Probe::load(ESMReader &esm)
|
|
|
|
{
|
|
|
|
mModel = esm.getHNString("MODL");
|
2014-04-13 11:23:50 +00:00
|
|
|
mName = esm.getHNOString("FNAM");
|
2013-03-22 04:50:54 +00:00
|
|
|
|
|
|
|
esm.getHNT(mData, "PBDT", 16);
|
|
|
|
|
|
|
|
mScript = esm.getHNOString("SCRI");
|
|
|
|
mIcon = esm.getHNOString("ITEX");
|
|
|
|
}
|
|
|
|
|
2013-09-16 10:32:35 +00:00
|
|
|
void Probe::save(ESMWriter &esm) const
|
2013-03-22 04:50:54 +00:00
|
|
|
{
|
|
|
|
esm.writeHNCString("MODL", mModel);
|
2014-04-13 11:23:50 +00:00
|
|
|
esm.writeHNOCString("FNAM", mName);
|
2013-05-06 12:10:43 +00:00
|
|
|
|
2013-03-22 04:50:54 +00:00
|
|
|
esm.writeHNT("PBDT", mData, 16);
|
|
|
|
esm.writeHNOString("SCRI", mScript);
|
|
|
|
esm.writeHNOCString("ITEX", mIcon);
|
|
|
|
}
|
|
|
|
|
2013-05-06 12:10:43 +00:00
|
|
|
void Probe::blank()
|
|
|
|
{
|
|
|
|
mData.mWeight = 0;
|
|
|
|
mData.mValue = 0;
|
|
|
|
mData.mQuality = 0;
|
|
|
|
mData.mUses = 0;
|
|
|
|
mName.clear();
|
|
|
|
mModel.clear();
|
|
|
|
mIcon.clear();
|
|
|
|
mScript.clear();
|
|
|
|
}
|
2013-03-22 04:50:54 +00:00
|
|
|
}
|