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
@@ -2228,7 +2228,8 @@ namespace Framework.Constants
ReqExpOrHonor = 0x01, // requires proc target to give exp or honor for aura proc
TriggeredCanProc = 0x02, // aura can proc even with triggered spells
ReqPowerCost = 0x04, // requires triggering spell to have a power cost for aura proc
ReqSpellmod = 0x08 // requires triggering spell to be affected by proccing aura to drop charges
ReqSpellmod = 0x08, // requires triggering spell to be affected by proccing aura to drop charges
ReduceProc60 = 0x80 // aura should have a reduced chance to proc if level of proc Actor > 60
}
// Spell aura states
+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;
}