mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-15 23:19:56 +00:00
22 lines
418 B
C++
22 lines
418 B
C++
#include "spelllist.hpp"
|
|
|
|
#include "esmreader.hpp"
|
|
#include "esmwriter.hpp"
|
|
|
|
namespace ESM {
|
|
|
|
void SpellList::load(ESMReader &esm)
|
|
{
|
|
while (esm.isNextSub("NPCS")) {
|
|
mList.push_back(esm.getHString());
|
|
}
|
|
}
|
|
|
|
void SpellList::save(ESMWriter &esm) const
|
|
{
|
|
for (std::vector<std::string>::const_iterator it = mList.begin(); it != mList.end(); ++it) {
|
|
esm.writeHNString("NPCS", *it, 32);
|
|
}
|
|
}
|
|
|
|
}
|