1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 22:23:51 +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
{
return (other.mEffectID == mEffectID
&& other.mSkill == mSkill
&& other.mAttribute == mAttribute);
if (mEffectID != other.mEffectID)
return false;
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);
}
};