diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Spells/Auras/SpellAuras.cpp | 5 | ||||
| -rw-r--r-- | src/server/game/Spells/SpellMgr.h | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 6d334b2310d..c9abf8896b7 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -2007,6 +2007,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; } diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index 03520c228ef..112a0897349 100644 --- a/src/server/game/Spells/SpellMgr.h +++ b/src/server/game/Spells/SpellMgr.h @@ -241,8 +241,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 |
