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) if (Scaling.ResourceCoefficient != 0)
comboDamage = Scaling.ResourceCoefficient * value; 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) if (level > (int)_spellInfo.MaxLevel && _spellInfo.MaxLevel > 0)
level = (int)_spellInfo.MaxLevel; 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) if (level < 0)
level = 0; level = 0;
value += level * basePointsPerLevel; value += level * basePointsPerLevel;
+9
View File
@@ -3014,6 +3014,15 @@ namespace Game.Entities
spellInfo.AuraInterruptFlags[0] |= (uint)SpellAuraInterruptFlags.ChangeMap; spellInfo.AuraInterruptFlags[0] |= (uint)SpellAuraInterruptFlags.ChangeMap;
break; break;
// ENDOF FIRELANDS SPELLS // ENDOF FIRELANDS SPELLS
// ANTORUS THE BURNING THRONE SPELLS
// Decimation
case 244449:
// For some reason there is a instakill effect that serves absolutely no purpose.
// Until we figure out what it's actually used for we disable it.
spellInfo.GetEffect(2).Effect = 0;
break;
// ENDOF ANTORUS THE BURNING THRONE SPELLS
case 102445: // Summon Master Li Fei case 102445: // Summon Master Li Fei
spellInfo.GetEffect(0).TargetA = new SpellImplicitTargetInfo(Targets.DestDb); spellInfo.GetEffect(0).TargetA = new SpellImplicitTargetInfo(Targets.DestDb);
break; break;