Core/Spells: Include more than first 2 spell effects when determining if a spell is negative

Port From (https://github.com/TrinityCore/TrinityCore/commit/176c75e8dbad95bfdcd88034f75e1452997ddb07)
This commit is contained in:
hondacrx
2020-07-14 16:58:41 -04:00
parent 0f5801d9f4
commit e179d29b55
3 changed files with 15 additions and 26 deletions
+3 -9
View File
@@ -2499,6 +2499,9 @@ namespace Game.Entities
break;
}
}
if (!spellInfo._IsPositiveEffect(effect.EffectIndex, false))
spellInfo.NegativeEffects[(int)effect.EffectIndex] = true;
}
// spells ignoring hit result should not be binary
@@ -2587,15 +2590,6 @@ namespace Game.Entities
spellInfo.AttributesCu |= SpellCustomAttributes.SchoolmaskNormalWithMagic;
}
if (!spellInfo._IsPositiveEffect(0, false))
spellInfo.AttributesCu |= SpellCustomAttributes.NegativeEff0;
if (!spellInfo._IsPositiveEffect(1, false))
spellInfo.AttributesCu |= SpellCustomAttributes.NegativeEff1;
if (!spellInfo._IsPositiveEffect(2, false))
spellInfo.AttributesCu |= SpellCustomAttributes.NegativeEff2;
if (talentSpells.Contains(spellInfo.Id))
spellInfo.AttributesCu |= SpellCustomAttributes.IsTalent;