aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMitchesD <majklprofik@seznam.cz>2015-10-18 15:55:39 +0200
committerCarbenium <carbenium@outlook.com>2015-11-07 00:37:34 +0100
commit42cf4e7713123db3a098c6a52deb3c7ddd78ed42 (patch)
tree7a9c2fbbcace5ab8b98fdd6eb0532b3a09710eaf /src
parent63f253e95ca801966077282f27767cf1d191bfec (diff)
Merge pull request #15727 from ShinDarth/duel-cd
Core/SpellHistory: Improved Cooldown Duel Reset (cherry picked from commit 981e764004cc8b09c8f29205d9675bfd6e02ae7b) Conflicts: src/server/game/Spells/SpellHistory.cpp
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellHistory.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellHistory.cpp b/src/server/game/Spells/SpellHistory.cpp
index 4db1fcbe860..6a72fe5c773 100644
--- a/src/server/game/Spells/SpellHistory.cpp
+++ b/src/server/game/Spells/SpellHistory.cpp
@@ -912,6 +912,10 @@ void SpellHistory::RestoreCooldownStateAfterDuel()
{
Clock::time_point now = Clock::now();
uint32 cooldownDuration = c.second.CooldownEnd > now ? std::chrono::duration_cast<std::chrono::milliseconds>(c.second.CooldownEnd - now).count() : 0;
+
+ if (cooldownDuration == 0)
+ continue;
+
spellCooldown.SpellCooldowns.emplace_back(c.first, cooldownDuration);
}