1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

alchemy effect fix

This commit is contained in:
scrawl 2012-06-04 20:56:13 +02:00
parent d56defd4f4
commit 1ecc6f97ed

View File

@ -54,9 +54,20 @@ namespace MWGui
bool operator==(const SpellEffectParams& other) const bool operator==(const SpellEffectParams& other) const
{ {
return (other.mEffectID == mEffectID if (mEffectID != other.mEffectID)
&& other.mSkill == mSkill return false;
&& other.mAttribute == mAttribute);
bool involvesAttribute = (mEffectID == 74 // restore attribute
|| mEffectID == 85 // absorb attribute
|| mEffectID == 17 // drain attribute
|| mEffectID == 79 // fortify attribute
|| mEffectID == 22); // damage attribute
bool involvesSkill = (mEffectID == 78 // restore skill
|| mEffectID == 89 // absorb skill
|| mEffectID == 21 // drain skill
|| mEffectID == 83 // fortify skill
|| mEffectID == 26); // damage skill
return ((other.mSkill == mSkill) || !involvesSkill) && ((other.mAttribute == mAttribute) && !involvesAttribute);
} }
}; };