Core/Spells: Fixed spells that scale value with master not being affected by SpellModOp::Points and SpellModOp::PointsIndex spellmods

Port From (https://github.com/TrinityCore/TrinityCore/commit/bb67a4279145c37c2106d2bd7a54b14186502602)
This commit is contained in:
Hondacrx
2025-08-09 21:31:29 -04:00
parent 13554e08ab
commit 59cfc97e15
3 changed files with 23 additions and 23 deletions
+5 -11
View File
@@ -1640,19 +1640,13 @@ namespace Game.Entities
if (chrSpec == null)
return;
foreach (uint masterySpellId in chrSpec.MasterySpellID)
foreach (var (_, aura) in GetOwnedAuras())
{
Aura aura = GetAura(masterySpellId);
if (aura != null)
if (aura.GetCasterGUID() == GetGUID() && aura.GetSpellInfo().HasAttribute(SpellAttr8.MasteryAffectsPoints))
{
foreach (var spellEffectInfo in aura.GetSpellInfo().GetEffects())
{
float mult = spellEffectInfo.BonusCoefficient;
if (MathFunctions.fuzzyEq(mult, 0.0f))
continue;
aura.GetEffect(spellEffectInfo.EffectIndex).ChangeAmount((int)(value * mult));
}
foreach (var auraEff in aura.GetAuraEffects())
if (MathFunctions.fuzzyEq(auraEff.GetSpellEffectInfo().BonusCoefficient, 0.0f))
auraEff.RecalculateAmount(this);
}
}
}