mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-10 06:39:49 +00:00
restore INGR and MGEF
This commit is contained in:
parent
2d5ddd104b
commit
09195894cf
@ -13,7 +13,6 @@ void Ingredient::load(ESMReader &esm)
|
||||
esm.getHNT(mData, "IRDT", 56);
|
||||
mScript = esm.getHNOString("SCRI");
|
||||
mIcon = esm.getHNOString("ITEX");
|
||||
/*
|
||||
// horrible hack to fix broken data in records
|
||||
for (int i=0; i<4; ++i)
|
||||
{
|
||||
@ -36,7 +35,6 @@ void Ingredient::load(ESMReader &esm)
|
||||
mData.mSkills[i] = -1;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void Ingredient::save(ESMWriter &esm)
|
||||
|
@ -3,6 +3,8 @@
|
||||
#include "esm_reader.hpp"
|
||||
#include "esm_writer.hpp"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
const int NumberOfHardcodedFlags = 143;
|
||||
@ -36,10 +38,9 @@ void MagicEffect::load(ESMReader &esm)
|
||||
esm.getHNT(mIndex, "INDX");
|
||||
|
||||
esm.getHNT(mData, "MEDT", 36);
|
||||
/*
|
||||
if (mIndex>=0 && mIndex<NumberOfHardcodedFlags)
|
||||
mData.mFlags |= HardcodedFlags[mIndex];
|
||||
*/
|
||||
|
||||
mIcon = esm.getHNOString("ITEX");
|
||||
mParticle = esm.getHNOString("PTEX");
|
||||
|
||||
@ -58,7 +59,12 @@ void MagicEffect::load(ESMReader &esm)
|
||||
void MagicEffect::save(ESMWriter &esm)
|
||||
{
|
||||
esm.writeHNT("INDX", mIndex);
|
||||
|
||||
mData.mFlags &= 0xe00;
|
||||
esm.writeHNT("MEDT", mData, 36);
|
||||
if (mIndex>=0 && mIndex<NumberOfHardcodedFlags) {
|
||||
mData.mFlags |= HardcodedFlags[mIndex];
|
||||
}
|
||||
|
||||
esm.writeHNOCString("ITEX", mIcon);
|
||||
esm.writeHNOCString("PTEX", mParticle);
|
||||
|
Loading…
Reference in New Issue
Block a user