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

Ref #7789
This commit is contained in:
ariel-
2017-02-21 21:07:45 -03:00
committed by roc13x
parent ae4b91bcf6
commit 9f5b3920e2
3 changed files with 10 additions and 2 deletions

View File

@@ -0,0 +1 @@
UPDATE `spell_proc` SET `Chance`=2, `ProcsPerMinute`=0, `AttributesMask`=`AttributesMask`|0x80 WHERE `SpellId`=15600;

View File

@@ -1844,6 +1844,11 @@ float Aura::CalcProcChance(SpellProcEntry const& procEntry, ProcEventInfo& event
if (Player* modOwner = caster->GetSpellModOwner())
modOwner->ApplySpellMod<SPELLMOD_CHANCE_OF_SUCCESS>(GetId(), chance);
}
// proc chance is reduced by an additional 3.333% per level past 60
if ((procEntry.AttributesMask & PROC_ATTR_REDUCE_PROC_60) && eventInfo.GetActor()->getLevel() > 60)
chance = std::max(0.f, (1.f - ((eventInfo.GetActor()->getLevel() - 60) * 1.f / 30.f)) * chance);
return chance;
}

View File

@@ -239,8 +239,10 @@ enum ProcAttributes
PROC_ATTR_REQ_SPELLMOD = 0x0000008, // requires triggering spell to be affected by proccing aura to drop charges
PROC_ATTR_DISABLE_EFF_0 = 0x0000010, // explicitly disables aura proc from effects, USE ONLY IF 100% SURE AURA SHOULDN'T PROC
PROC_ATTR_DISABLE_EFF_1 = 0x0000020, // used to avoid a console error if the spell has invalid trigger spell and handled elsewhere
PROC_ATTR_DISABLE_EFF_2 = 0x0000040 // or handling not needed
PROC_ATTR_DISABLE_EFF_1 = 0x0000020, /// used to avoid a console error if the spell has invalid trigger spell and handled elsewhere
PROC_ATTR_DISABLE_EFF_2 = 0x0000040, /// or handling not needed
PROC_ATTR_REDUCE_PROC_60 = 0x0000080 // aura should have a reduced chance to proc if level of proc Actor > 60
};
struct SpellProcEntry