2011-04-08 17:58:21 +04:00
|
|
|
#include "loadench.hpp"
|
|
|
|
|
2012-09-23 22:41:41 +04:00
|
|
|
#include "esmreader.hpp"
|
|
|
|
#include "esmwriter.hpp"
|
2013-09-24 13:17:28 +02:00
|
|
|
#include "defs.hpp"
|
2012-09-17 11:37:50 +04:00
|
|
|
|
2011-04-08 17:58:21 +04:00
|
|
|
namespace ESM
|
|
|
|
{
|
2013-09-24 13:17:28 +02:00
|
|
|
unsigned int Enchantment::sRecordId = REC_ENCH;
|
2011-04-08 17:58:21 +04:00
|
|
|
|
|
|
|
void Enchantment::load(ESMReader &esm)
|
|
|
|
{
|
2012-09-17 11:37:50 +04:00
|
|
|
esm.getHNT(mData, "ENDT", 16);
|
|
|
|
mEffects.load(esm);
|
2011-04-08 17:58:21 +04:00
|
|
|
}
|
2012-09-17 11:37:50 +04:00
|
|
|
|
2013-09-16 12:32:35 +02:00
|
|
|
void Enchantment::save(ESMWriter &esm) const
|
2012-04-06 21:04:30 +02:00
|
|
|
{
|
2012-09-17 11:37:50 +04:00
|
|
|
esm.writeHNT("ENDT", mData, 16);
|
|
|
|
mEffects.save(esm);
|
2011-04-08 17:58:21 +04:00
|
|
|
}
|
|
|
|
|
2014-06-30 20:40:34 +02:00
|
|
|
void Enchantment::blank()
|
|
|
|
{
|
|
|
|
mData.mType = 0;
|
|
|
|
mData.mCost = 0;
|
|
|
|
mData.mCharge = 0;
|
|
|
|
mData.mAutocalc = 0;
|
|
|
|
|
|
|
|
mEffects.mList.clear();
|
|
|
|
}
|
2011-04-08 17:58:21 +04:00
|
|
|
}
|