Ensure that all actions are compared to fixed point in time (ie. world update start)
Port From (https://github.com/TrinityCore/TrinityCore/commit/60663d1374beef3103f4787152654034fa4a8897)
This commit is contained in:
@@ -97,7 +97,7 @@ namespace Scripts.World
|
||||
// remove cooldowns on spells that have < 10 min CD > 30 sec and has no onHold
|
||||
player.GetSpellHistory().ResetCooldowns(pair =>
|
||||
{
|
||||
DateTime now = DateTime.Now;
|
||||
DateTime now = GameTime.GetGameTimeSystemPoint();
|
||||
uint cooldownDuration = pair.Value.CooldownEnd > now ? (uint)(pair.Value.CooldownEnd - now).TotalMilliseconds : 0;
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(pair.Key);
|
||||
return spellInfo.RecoveryTime < 10 * Time.Minute * Time.InMilliseconds
|
||||
|
||||
Reference in New Issue
Block a user