Core/Auras: Implement SPELL_AURA_IGNORE_SPELL_COOLDOWN

Port From (https://github.com/TrinityCore/TrinityCore/commit/87f350b1c194442ff48cbb9290c162d21a93f0e8)
This commit is contained in:
hondacrx
2023-09-02 15:18:41 -04:00
parent d3dd837b11
commit 469c5ef862
2 changed files with 8 additions and 1 deletions
+3
View File
@@ -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;
+5 -1
View File
@@ -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)