Core/Spells: Corrected SPELL_ATTR8_MASTERY_AFFECTS_POINTS attribute implementation, it is no longer used to restrict if the spell should be cast or not (SpecializationSpells.db2 takes care of that)

Port From (https://github.com/TrinityCore/TrinityCore/commit/2a4c7c1e27ac5236874a8fd5315abee196ab4c9a)
This commit is contained in:
hondacrx
2022-01-07 12:56:36 -05:00
parent a09f085aa9
commit 9e7eca2258
3 changed files with 2 additions and 18 deletions
+1 -5
View File
@@ -74,7 +74,7 @@ namespace Game.Spells
// default amount calculation
int amount = 0;
if (!m_spellInfo.HasAttribute(SpellAttr8.MasterySpecialization) || MathFunctions.fuzzyEq(GetSpellEffectInfo().BonusCoefficient, 0.0f))
if (!m_spellInfo.HasAttribute(SpellAttr8.MasteryAffectPoints) || MathFunctions.fuzzyEq(GetSpellEffectInfo().BonusCoefficient, 0.0f))
amount = GetSpellEffectInfo().CalcValue(caster, m_baseAmount, GetBase().GetOwner().ToUnit(), GetBase().GetCastItemId(), GetBase().GetCastItemLevel());
else if (caster != null && caster.IsTypeId(TypeId.Player))
amount = (int)(caster.ToPlayer().m_activePlayerData.Mastery * GetSpellEffectInfo().BonusCoefficient);
@@ -774,10 +774,6 @@ namespace Game.Spells
if (spellInfo == null || !(spellInfo.IsPassive() || spellInfo.HasAttribute(SpellAttr0.HiddenClientside)))
continue;
// always valid?
if (spellInfo.HasAttribute(SpellAttr8.MasterySpecialization) && !plrTarget.IsCurrentSpecMasterySpell(spellInfo))
continue;
if (Convert.ToBoolean(spellInfo.Stances & (1ul << (GetMiscValue() - 1))))
target.CastSpell(target, pair.Key, new CastSpellExtraArgs(this));
}