From 469c5ef8623b672f78a37711fdca75e510f594ed Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sat, 2 Sep 2023 15:18:41 -0400 Subject: [PATCH] Core/Auras: Implement SPELL_AURA_IGNORE_SPELL_COOLDOWN Port From (https://github.com/TrinityCore/TrinityCore/commit/87f350b1c194442ff48cbb9290c162d21a93f0e8) --- Source/Game/Spells/SpellHistory.cs | 3 +++ Source/Game/Spells/SpellManager.cs | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/Game/Spells/SpellHistory.cs b/Source/Game/Spells/SpellHistory.cs index 4bb38e26c..a514bc2d0 100644 --- a/Source/Game/Spells/SpellHistory.cs +++ b/Source/Game/Spells/SpellHistory.cs @@ -632,6 +632,9 @@ namespace Game.Spells public bool HasCooldown(SpellInfo spellInfo, uint itemId = 0) { + if (_owner.HasAuraTypeWithAffectMask(AuraType.IgnoreSpellCooldown, spellInfo)) + return false; + if (_spellCooldowns.ContainsKey(spellInfo.Id)) return true; diff --git a/Source/Game/Spells/SpellManager.cs b/Source/Game/Spells/SpellManager.cs index c411e95b1..c8e201d82 100644 --- a/Source/Game/Spells/SpellManager.cs +++ b/Source/Game/Spells/SpellManager.cs @@ -1405,7 +1405,8 @@ namespace Game.Entities continue; if (spellEffectInfo.ApplyAuraName == AuraType.AddPctModifier || spellEffectInfo.ApplyAuraName == AuraType.AddFlatModifier - || spellEffectInfo.ApplyAuraName == AuraType.AddPctModifierBySpellLabel || spellEffectInfo.ApplyAuraName == AuraType.AddFlatModifierBySpellLabel) + || spellEffectInfo.ApplyAuraName == AuraType.AddPctModifierBySpellLabel || spellEffectInfo.ApplyAuraName == AuraType.AddFlatModifierBySpellLabel + || spellEffectInfo.ApplyAuraName == AuraType.IgnoreSpellCooldown) { found = true; break; @@ -4634,10 +4635,12 @@ namespace Game.Entities case AuraType.ModWeaponCritPercent: case AuraType.ModBlockPercent: case AuraType.ModRoot2: + case AuraType.IgnoreSpellCooldown: return true; } return false; } + bool IsAlwaysTriggeredAura(AuraType type) { switch (type) @@ -4657,6 +4660,7 @@ namespace Game.Entities } return false; } + ProcFlagsSpellType GetSpellTypeMask(AuraType type) { switch (type)