diff options
author | Ovah <dreadkiller@gmx.de> | 2018-07-29 18:49:13 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-10-17 18:41:27 +0200 |
commit | 7084e0c3601cef86d01d2162c77623feef9fc8f2 (patch) | |
tree | cf9a7239f61ebc11c82fdbcd30946f07948ee13c /src | |
parent | c0797592918d3fce2d6645e85ddec7c8c3362526 (diff) |
Core/Spells: added a helper to reset proc cooldowns (#22137)
(cherry picked from commit c48a596c66c075c876c860a7d5c036d033de0b9d)
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 0f6a4eb95e7..903d2e30798 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1721,6 +1721,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 f298b6a89ee..ac99042d961 100644 --- a/src/server/game/Spells/Auras/SpellAuras.h +++ b/src/server/game/Spells/Auras/SpellAuras.h @@ -244,6 +244,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); |