2014-05-02 10:47:28 +00:00
|
|
|
#include "quickkeys.hpp"
|
|
|
|
|
|
|
|
#include "esmreader.hpp"
|
|
|
|
#include "esmwriter.hpp"
|
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
|
|
|
|
void QuickKeys::load(ESMReader& esm)
|
|
|
|
{
|
2014-05-12 19:04:02 +00:00
|
|
|
while (esm.isNextSub("TYPE"))
|
2014-05-02 10:47:28 +00:00
|
|
|
{
|
|
|
|
QuickKey key;
|
2023-03-21 19:53:04 +00:00
|
|
|
esm.getHT(key.mType);
|
2023-03-21 19:44:42 +00:00
|
|
|
key.mId = esm.getHNRefId("ID__");
|
2014-05-02 10:47:28 +00:00
|
|
|
|
|
|
|
mKeys.push_back(key);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void QuickKeys::save(ESMWriter& esm) const
|
|
|
|
{
|
2023-03-21 19:45:49 +00:00
|
|
|
for (const QuickKey& key : mKeys)
|
2014-05-02 10:47:28 +00:00
|
|
|
{
|
2023-03-21 19:45:49 +00:00
|
|
|
esm.writeHNT("TYPE", key.mType);
|
|
|
|
esm.writeHNRefId("ID__", key.mId);
|
2014-05-02 10:47:28 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|