2011-04-08 13:58:21 +00:00
|
|
|
#include "loadingr.hpp"
|
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
|
|
|
|
void Ingredient::load(ESMReader &esm)
|
|
|
|
{
|
|
|
|
model = esm.getHNString("MODL");
|
|
|
|
name = esm.getHNString("FNAM");
|
|
|
|
esm.getHNT(data, "IRDT", 56);
|
|
|
|
script = esm.getHNOString("SCRI");
|
|
|
|
icon = esm.getHNOString("ITEX");
|
|
|
|
}
|
2012-04-06 19:04:30 +00:00
|
|
|
void Ingredient::save(ESMWriter &esm)
|
|
|
|
{
|
|
|
|
esm.writeHNString("MODL", model);
|
|
|
|
esm.writeHNString("FNAM", name);
|
|
|
|
esm.writeHNT("IRDT", data, 56);
|
|
|
|
if (!script.empty())
|
|
|
|
esm.writeHNString("SCRI", script);
|
|
|
|
if (!icon.empty())
|
|
|
|
esm.writeHNString("ITEX", script);
|
|
|
|
}
|
2011-04-08 13:58:21 +00:00
|
|
|
|
|
|
|
}
|