mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Merge pull request #15727 from ShinDarth/duel-cd
Core/SpellHistory: Improved Cooldown Duel Reset
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user