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:
parent
d56defd4f4
commit
1ecc6f97ed
@ -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);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user