Corrected points per level calculation for some spells

Port From (https://github.com/TrinityCore/TrinityCore/commit/8df577ebfed34131184d2fd08b131b29b96d4fd3)
This commit is contained in:
hondacrx
2020-05-06 17:54:31 -04:00
parent 43fcc558e4
commit f723336c35
2 changed files with 15 additions and 4 deletions
+6 -4
View File
@@ -3934,14 +3934,16 @@ namespace Game.Spells
if (Scaling.ResourceCoefficient != 0)
comboDamage = Scaling.ResourceCoefficient * value;
}
else
else if(GetScalingExpectedStat() == ExpectedStatType.None)
{
if (GetScalingExpectedStat() == ExpectedStatType.None)
if (caster != null && basePointsPerLevel != 0.0f)
{
int level = caster ? (int)caster.GetLevel() : 0;
int level = (int)caster.GetLevel();
if (level > (int)_spellInfo.MaxLevel && _spellInfo.MaxLevel > 0)
level = (int)_spellInfo.MaxLevel;
level -= (int)_spellInfo.BaseLevel;
// if base level is greater than spell level, reduce by base level (eg. pilgrims foods)
level -= (int)Math.Max(_spellInfo.BaseLevel, _spellInfo.SpellLevel);
if (level < 0)
level = 0;
value += level * basePointsPerLevel;