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
@@ -2278,9 +2278,6 @@ namespace Game.Entities
bool need_cast = (spellInfo.Stances == 0 || (form != 0 && Convert.ToBoolean(spellInfo.Stances & (1ul << ((int)form - 1)))) ||
(form == 0 && spellInfo.HasAttribute(SpellAttr2.NotNeedShapeshift)));
if (spellInfo.HasAttribute(SpellAttr8.MasterySpecialization))
need_cast &= IsCurrentSpecMasterySpell(spellInfo);
// Check EquippedItemClass
// passive spells which apply aura and have an item requirement are to be added manually, instead of casted
if (spellInfo.EquippedItemClass >= 0)
@@ -2300,15 +2297,6 @@ namespace Game.Entities
return need_cast && (spellInfo.CasterAuraState == 0 || HasAuraState(spellInfo.CasterAuraState));
}
public bool IsCurrentSpecMasterySpell(SpellInfo spellInfo)
{
ChrSpecializationRecord chrSpec = CliDB.ChrSpecializationStorage.LookupByKey(GetPrimarySpecialization());
if (chrSpec != null)
return spellInfo.Id == chrSpec.MasterySpellID[0] || spellInfo.Id == chrSpec.MasterySpellID[1];
return false;
}
public void AddStoredAuraTeleportLocation(uint spellId)
{
StoredAuraTeleportLocation storedLocation = new();