Core/Spells: fix Hand of Justice proc chance and reduce it past level 60.

Port From (https://github.com/TrinityCore/TrinityCore/commit/b91eac6a1c377c14ebe2b66104ac02e2f9a01ad4)
This commit is contained in:
hondacrx
2019-08-31 11:02:38 -04:00
parent 01a8140203
commit f7f2930ac8
2 changed files with 7 additions and 1 deletions
+5
View File
@@ -1798,6 +1798,11 @@ namespace Game.Spells
if (modOwner != null)
modOwner.ApplySpellMod(GetId(), SpellModOp.ChanceOfSuccess, ref chance);
}
// proc chance is reduced by an additional 3.333% per level past 60
if (procEntry.AttributesMask.HasAnyFlag(ProcAttributes.ReduceProc60) && eventInfo.GetActor().getLevel() > 60)
chance = Math.Max(0.0f, (1.0f - ((eventInfo.GetActor().getLevel() - 60) * 1.0f / 30.0f)) * chance);
return chance;
}