Core/Spells: rework part 1: Improved positive detection logic
Port From (https://github.com/TrinityCore/TrinityCore/commit/1e1415a49128d034c8d48aa8cbb5d157200371b0)
This commit is contained in:
@@ -2615,7 +2615,6 @@ namespace Game.Entities
|
||||
|
||||
foreach (SpellInfo spellInfo in spells)
|
||||
{
|
||||
// TODO: validate attributes
|
||||
if (attributes.HasAnyFlag((uint)SpellCustomAttributes.ShareDamage))
|
||||
{
|
||||
if (!spellInfo.HasEffect(SpellEffectName.SchoolDamage))
|
||||
@@ -2763,9 +2762,6 @@ namespace Game.Entities
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!spellInfo._IsPositiveEffect(effect.EffectIndex, false))
|
||||
spellInfo.NegativeEffects[(int)effect.EffectIndex] = true;
|
||||
}
|
||||
|
||||
// spells ignoring hit result should not be binary
|
||||
@@ -2854,6 +2850,8 @@ namespace Game.Entities
|
||||
spellInfo.AttributesCu |= SpellCustomAttributes.SchoolmaskNormalWithMagic;
|
||||
}
|
||||
|
||||
spellInfo.InitializeSpellPositivity();
|
||||
|
||||
if (talentSpells.Contains(spellInfo.Id))
|
||||
spellInfo.AttributesCu |= SpellCustomAttributes.IsTalent;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user