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:
parent
d56defd4f4
commit
1ecc6f97ed
1 changed files with 14 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue