1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-06 08:15:34 +00:00

Issue #378: workaround for bad ingredient records in Morrowind.esm

This commit is contained in:
Marc Zinnschlag 2012-08-28 10:12:22 +02:00
parent 40d4dad15e
commit 34c30b132c

View file

@ -12,6 +12,18 @@ void Ingredient::load(ESMReader &esm, const std::string& id)
esm.getHNT(data, "IRDT", 56);
script = esm.getHNOString("SCRI");
icon = esm.getHNOString("ITEX");
// horrible hack to fix broken data in records
for (int i=0; i<4; ++i)
{
if (data.effectID[i]!=85 && data.effectID[i]!=22 && data.effectID[i]!=17 && data.effectID[i]!=79 &&
data.effectID[i]!=74)
data.attributes[i] = -1;
if (data.effectID[i]!=89 && data.effectID[i]!=26 && data.effectID[i]!=21 && data.effectID[i]!=83 &&
data.effectID[i]!=78)
data.skills[i] = -1;
}
}
}