Core/CombatAI: Use TimeSpan overloads of EventMap

Port From (https://github.com/TrinityCore/TrinityCore/commit/d62b7c1e352e76f35490c22b2ab291ed299f4fa4)
This commit is contained in:
hondacrx
2022-02-28 14:13:02 -05:00
parent facb5c89a1
commit 03c646d2c8
3 changed files with 13 additions and 11 deletions
+3 -3
View File
@@ -331,8 +331,8 @@ namespace Game.AI
else
AIInfo.condition = AICondition.Combat;
if (AIInfo.cooldown < spellInfo.RecoveryTime)
AIInfo.cooldown = spellInfo.RecoveryTime;
if (AIInfo.cooldown.TotalMilliseconds < spellInfo.RecoveryTime)
AIInfo.cooldown = TimeSpan.FromMilliseconds(spellInfo.RecoveryTime);
if (spellInfo.GetMaxRange(false) == 0)
{
@@ -370,7 +370,7 @@ namespace Game.AI
}
}
}
AIInfo.realCooldown = spellInfo.RecoveryTime + spellInfo.StartRecoveryTime;
AIInfo.realCooldown = TimeSpan.FromMilliseconds(spellInfo.RecoveryTime + spellInfo.StartRecoveryTime);
AIInfo.maxRange = spellInfo.GetMaxRange(false) * 3 / 4;
AIInfo.Effects = 0;