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