diff options
| author | Ovah <dreadkiller@gmx.de> | 2018-07-29 18:49:13 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2018-07-29 18:49:13 +0200 |
| commit | c48a596c66c075c876c860a7d5c036d033de0b9d (patch) | |
| tree | 9cf1f8f4d14c68acaa22295ae1dd0bd0906b672d /src | |
| parent | a815c645169801ce24a7871b7cbd5998e4473a2c (diff) | |
Core/Spells: added a helper to reset proc cooldowns (#22137)
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Spells/Auras/SpellAuras.cpp | 5 | ||||
| -rw-r--r-- | src/server/game/Spells/Auras/SpellAuras.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 142e6f8b4e3..4ad31aa9ba2 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1990,6 +1990,11 @@ void Aura::AddProcCooldown(std::chrono::steady_clock::time_point cooldownEnd) m_procCooldown = cooldownEnd; } +void Aura::ResetProcCooldown() +{ + m_procCooldown = std::chrono::steady_clock::now(); +} + void Aura::PrepareProcToTrigger(AuraApplication* aurApp, ProcEventInfo& eventInfo, std::chrono::steady_clock::time_point now) { bool prepare = CallScriptPrepareProcHandlers(aurApp, eventInfo); diff --git a/src/server/game/Spells/Auras/SpellAuras.h b/src/server/game/Spells/Auras/SpellAuras.h index dcdc6b55ff1..10e8765c65f 100644 --- a/src/server/game/Spells/Auras/SpellAuras.h +++ b/src/server/game/Spells/Auras/SpellAuras.h @@ -216,6 +216,7 @@ class TC_GAME_API Aura bool IsProcOnCooldown(std::chrono::steady_clock::time_point now) const; void AddProcCooldown(std::chrono::steady_clock::time_point cooldownEnd); + void ResetProcCooldown(); bool IsUsingCharges() const { return m_isUsingCharges; } void SetUsingCharges(bool val) { m_isUsingCharges = val; } void PrepareProcToTrigger(AuraApplication* aurApp, ProcEventInfo& eventInfo, std::chrono::steady_clock::time_point now); |
