Core/Spells: Implement using different difficulty data from all spell related db2s, not just SpellEffect and SpellPower

Port From (https://github.com/TrinityCore/TrinityCore/commit/c7306439e7004288fb85890d6a5f730cf1761d71)
This commit is contained in:
hondacrx
2020-06-18 12:39:39 -04:00
parent f0942a257e
commit d7954f4fc7
89 changed files with 1738 additions and 1893 deletions
+4 -4
View File
@@ -456,7 +456,7 @@ namespace Scripts.Spells.Paladin
{
public override bool Validate(SpellInfo spellInfo)
{
SpellInfo firstRankSpellInfo = Global.SpellMgr.GetSpellInfo(SpellIds.HolyShockR1);
SpellInfo firstRankSpellInfo = Global.SpellMgr.GetSpellInfo(SpellIds.HolyShockR1, Difficulty.None);
if (firstRankSpellInfo == null)
return false;
@@ -596,7 +596,7 @@ namespace Scripts.Spells.Paladin
{
if (eff.GetSpellInfo().GetSpellSpecific() == SpellSpecificType.Seal && eff.GetEffIndex() == 2)
{
if (Global.SpellMgr.HasSpellInfo((uint)eff.GetAmount()))
if (Global.SpellMgr.HasSpellInfo((uint)eff.GetAmount(), GetCastDifficulty()))
{
spellId = (uint)eff.GetAmount();
break;
@@ -923,9 +923,9 @@ namespace Scripts.Spells.Paladin
Unit caster = eventInfo.GetActor();
Unit target = eventInfo.GetProcTarget();
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(SpellIds.HolyMending);
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(SpellIds.HolyMending, GetCastDifficulty());
int amount = (int)MathFunctions.CalculatePct(healInfo.GetHeal(), aurEff.GetAmount());
amount /= (int)spellInfo.GetMaxTicks(Difficulty.None);
amount /= (int)spellInfo.GetMaxTicks();
// Add remaining ticks to damage done
amount += (int)target.GetRemainingPeriodicAmount(caster.GetGUID(), SpellIds.HolyMending, AuraType.PeriodicHeal);