aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2017-02-21 21:07:45 -0300
committerariel- <ariel-@users.noreply.github.com>2017-02-21 21:20:33 -0300
commitf4ae639961542112dddcf627fc2e1f11967048a9 (patch)
treeda641e8962001bc44a8fda4f1b5c355fdd644195 /src/server
parentb4b031bcd4424e7e9bea6e5dfdb8a2fb5158435b (diff)
Core/Spells: fix Hand of Justice proc chance and reduce it past level 60.
Ref #7789
Diffstat (limited to 'src/server')
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp5
-rw-r--r--src/server/game/Spells/SpellMgr.h6
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