Core/Players: Improve reset spell cooldowns when entering arenas
Port From (https://github.com/TrinityCore/TrinityCore/commit/752ea0f8e9a04abd53a3b811de2fbb91b689e69f)
This commit is contained in:
@@ -3380,7 +3380,13 @@ namespace Game.Entities
|
||||
GetSpellHistory().ResetCooldowns(p =>
|
||||
{
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(p.Key, Difficulty.None);
|
||||
return spellInfo.RecoveryTime < 10 * Time.Minute * Time.InMilliseconds && spellInfo.CategoryRecoveryTime < 10 * Time.Minute * Time.InMilliseconds && !spellInfo.HasAttribute(SpellAttr6.DoNotResetCooldownInArena);
|
||||
TimeSpan cooldown = TimeSpan.Zero;
|
||||
TimeSpan categoryCooldown = TimeSpan.Zero;
|
||||
uint categoryId = 0;
|
||||
SpellHistory.GetCooldownDurations(spellInfo, p.Value.ItemId, ref cooldown, ref categoryId, ref categoryCooldown);
|
||||
return cooldown < TimeSpan.FromMinutes(10)
|
||||
&& categoryCooldown < TimeSpan.FromMinutes(10)
|
||||
&& !spellInfo.HasAttribute(SpellAttr6.DoNotResetCooldownInArena);
|
||||
}, true);
|
||||
|
||||
// pet cooldowns
|
||||
|
||||
Reference in New Issue
Block a user