Core/Spells: fixed some rare stealth/prowl visual bugs after duel cd reset

This commit is contained in:
ShinDarth
2015-10-23 11:56:47 +02:00
parent 5c449b50aa
commit 81980ae58c

View File

@@ -678,7 +678,8 @@ 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)
// cooldownDuration must be between 0 and 10 minutes in order to avoid any visual bugs
if (cooldownDuration == 0 || cooldownDuration > 10 * MINUTE * IN_MILLISECONDS)
continue;
cooldowns[itr->first] = cooldownDuration;