Core/SpellHistory: Improved Cooldown Duel Reset

- Do not send useless data to the client
- Fixed a rare visual bug
This commit is contained in:
ShinDarth
2015-10-18 02:11:51 +02:00
parent 4204805d47
commit 9bd8522c0d

View File

@@ -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;
}