mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-30 05:47:57 +03:00
Imported Upstream version 0.26.0
This commit is contained in:
commit
9a2b6c69b6
1398 changed files with 212217 additions and 0 deletions
22
components/esm/spelllist.cpp
Normal file
22
components/esm/spelllist.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#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)
|
||||
{
|
||||
for (std::vector<std::string>::iterator it = mList.begin(); it != mList.end(); ++it) {
|
||||
esm.writeHNString("NPCS", *it, 32);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue