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
38
components/esm/loadalch.cpp
Normal file
38
components/esm/loadalch.cpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
#include "loadalch.hpp"
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
void Potion::load(ESMReader &esm)
|
||||
{
|
||||
mModel = esm.getHNString("MODL");
|
||||
mIcon = esm.getHNOString("TEXT"); // not ITEX here for some reason
|
||||
mScript = esm.getHNOString("SCRI");
|
||||
mName = esm.getHNOString("FNAM");
|
||||
esm.getHNT(mData, "ALDT", 12);
|
||||
mEffects.load(esm);
|
||||
}
|
||||
void Potion::save(ESMWriter &esm)
|
||||
{
|
||||
esm.writeHNCString("MODL", mModel);
|
||||
esm.writeHNOCString("TEXT", mIcon);
|
||||
esm.writeHNOCString("SCRI", mScript);
|
||||
esm.writeHNOCString("FNAM", mName);
|
||||
esm.writeHNT("ALDT", mData, 12);
|
||||
mEffects.save(esm);
|
||||
}
|
||||
|
||||
void Potion::blank()
|
||||
{
|
||||
mData.mWeight = 0;
|
||||
mData.mValue = 0;
|
||||
mData.mAutoCalc = 0;
|
||||
mName.clear();
|
||||
mModel.clear();
|
||||
mIcon.clear();
|
||||
mScript.clear();
|
||||
mEffects.mList.clear();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue