mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 19:31:59 +01:00
Merge pull request #15727 from ShinDarth/duel-cd
Core/SpellHistory: Improved Cooldown Duel Reset
(cherry picked from commit 981e764004)
Conflicts:
src/server/game/Spells/SpellHistory.cpp
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user