mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
Core/Spells: fix Hand of Justice proc chance and reduce it past level 60.
Ref #7789
This commit is contained in:
1
sql/updates/world/3.3.5/2017_02_21_00_world.sql
Normal file
1
sql/updates/world/3.3.5/2017_02_21_00_world.sql
Normal file
@@ -0,0 +1 @@
|
||||
UPDATE `spell_proc` SET `Chance`=2, `ProcsPerMinute`=0, `AttributesMask`=`AttributesMask`|0x80 WHERE `SpellId`=15600;
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user