From 7084e0c3601cef86d01d2162c77623feef9fc8f2 Mon Sep 17 00:00:00 2001 From: Ovah Date: Sun, 29 Jul 2018 18:49:13 +0200 Subject: Core/Spells: added a helper to reset proc cooldowns (#22137) (cherry picked from commit c48a596c66c075c876c860a7d5c036d033de0b9d) --- src/server/game/Spells/Auras/SpellAuras.cpp | 5 +++++ src/server/game/Spells/Auras/SpellAuras.h | 1 + 2 files changed, 6 insertions(+) (limited to 'src/server') 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); -- cgit v1.2.3