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:
@@ -2228,7 +2228,8 @@ namespace Framework.Constants
|
|||||||
ReqExpOrHonor = 0x01, // requires proc target to give exp or honor for aura proc
|
ReqExpOrHonor = 0x01, // requires proc target to give exp or honor for aura proc
|
||||||
TriggeredCanProc = 0x02, // aura can proc even with triggered spells
|
TriggeredCanProc = 0x02, // aura can proc even with triggered spells
|
||||||
ReqPowerCost = 0x04, // requires triggering spell to have a power cost for aura proc
|
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
|
// Spell aura states
|
||||||
|
|||||||
@@ -1798,6 +1798,11 @@ namespace Game.Spells
|
|||||||
if (modOwner != null)
|
if (modOwner != null)
|
||||||
modOwner.ApplySpellMod(GetId(), SpellModOp.ChanceOfSuccess, ref chance);
|
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;
|
return chance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user