diff options
author | MitchesD <majklprofik@seznam.cz> | 2015-10-18 15:55:39 +0200 |
---|---|---|
committer | MitchesD <majklprofik@seznam.cz> | 2015-10-18 15:55:39 +0200 |
commit | 981e764004cc8b09c8f29205d9675bfd6e02ae7b (patch) | |
tree | fe8852e5143b3f27c03a5e242e0ca260547da8aa | |
parent | 8ff619ddc40fee1739125e91d20b519078c3f2fb (diff) | |
parent | 9bd8522c0d626a83dacccaeb2dbb32861ec7e137 (diff) |
Merge pull request #15727 from ShinDarth/duel-cd
Core/SpellHistory: Improved Cooldown Duel Reset
-rw-r--r-- | src/server/game/Spells/SpellHistory.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellHistory.cpp b/src/server/game/Spells/SpellHistory.cpp index 0ae5fe97b13..3c157f0b17b 100644 --- a/src/server/game/Spells/SpellHistory.cpp +++ b/src/server/game/Spells/SpellHistory.cpp @@ -677,6 +677,10 @@ void SpellHistory::RestoreCooldownStateAfterDuel() { Clock::time_point now = Clock::now(); uint32 cooldownDuration = itr->second.CooldownEnd > now ? std::chrono::duration_cast<std::chrono::milliseconds>(itr->second.CooldownEnd - now).count() : 0; + + if (cooldownDuration == 0) + continue; + cooldowns[itr->first] = cooldownDuration; } |