mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 19:29:56 +00:00
c8bb733360
replaced ciEqual with == operator
32 lines
664 B
C++
32 lines
664 B
C++
#include "spelllist.hpp"
|
|
|
|
#include "esmreader.hpp"
|
|
#include "esmwriter.hpp"
|
|
|
|
#include <components/misc/strings/algorithm.hpp>
|
|
|
|
namespace ESM
|
|
{
|
|
|
|
void SpellList::add(ESMReader& esm)
|
|
{
|
|
mList.push_back(esm.getRefId());
|
|
}
|
|
|
|
void SpellList::save(ESMWriter& esm) const
|
|
{
|
|
for (auto it = mList.begin(); it != mList.end(); ++it)
|
|
{
|
|
esm.writeHNString("NPCS", it->getRefIdString(), 32);
|
|
}
|
|
}
|
|
|
|
bool SpellList::exists(const ESM::RefId& spell) const
|
|
{
|
|
for (auto it = mList.begin(); it != mList.end(); ++it)
|
|
if (*it == spell)
|
|
return true;
|
|
return false;
|
|
}
|
|
|
|
}
|