mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-06 00:55:50 +00:00
29 lines
646 B
C++
29 lines
646 B
C++
#include "loadweap.hpp"
|
|
|
|
#include "esm_reader.hpp"
|
|
#include "esm_writer.hpp"
|
|
|
|
namespace ESM
|
|
{
|
|
|
|
void Weapon::load(ESMReader &esm)
|
|
{
|
|
mModel = esm.getHNString("MODL");
|
|
mName = esm.getHNOString("FNAM");
|
|
esm.getHNT(mData, "WPDT", 32);
|
|
mScript = esm.getHNOString("SCRI");
|
|
mIcon = esm.getHNOString("ITEX");
|
|
mEnchant = esm.getHNOString("ENAM");
|
|
}
|
|
void Weapon::save(ESMWriter &esm)
|
|
{
|
|
esm.writeHNCString("MODL", mModel);
|
|
esm.writeHNOCString("FNAM", mName);
|
|
esm.writeHNT("WPDT", mData, 32);
|
|
esm.writeHNOCString("SCRI", mScript);
|
|
esm.writeHNOCString("ITEX", mIcon);
|
|
esm.writeHNOCString("ENAM", mEnchant);
|
|
}
|
|
|
|
}
|