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
+12 -3
View File
@@ -4123,6 +4123,7 @@ namespace Game.Spells
value += level * basePointsPerLevel;
}
}
// random damage
if (casterUnit != null)
{
@@ -4133,11 +4134,19 @@ namespace Game.Spells
if (comboPoints != 0)
value += comboDamage * comboPoints;
}
if (caster != null)
value = caster.ApplyEffectModifiers(_spellInfo, EffectIndex, value);
}
if (_spellInfo.HasAttribute(SpellAttr8.MasteryAffectsPoints))
{
Player playerCaster = caster?.ToPlayer();
if (playerCaster != null)
value += playerCaster.m_activePlayerData.Mastery * BonusCoefficient;
}
if (caster != null)
value = caster.ApplyEffectModifiers(_spellInfo, EffectIndex, value);
return (int)Math.Round(value);
}