From fcdcb69fe5b1e3ea4e09e50206b987e2fbd43414 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Thu, 5 May 2022 09:54:37 -0400 Subject: [PATCH] Core/Spells: Implement CAST_FLAG_EX_IGNORE_COOLDOWN - causes spells to not automatically trigger cooldown clientside Port From (https://github.com/TrinityCore/TrinityCore/commit/66509502f4a5065d74cb3da501558f7eff6ea1ec) --- Source/Framework/Constants/Spells/SpellConst.cs | 2 +- Source/Game/Spells/Spell.cs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index 52bc24761..a5ff29d69 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -1557,7 +1557,7 @@ namespace Framework.Constants Unknown7 = 0x40, Unknown8 = 0x80, Unknown9 = 0x100, - Unknown10 = 0x200, + IgnoreCooldown = 0x200, // makes client not automatically start cooldown after SPELL_GO Unknown11 = 0x400, Unknown12 = 0x800, Unknown13 = 0x1000, diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index 95f807222..395832ee9 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -43,6 +43,10 @@ namespace Game.Spells m_caster = (info.HasAttribute(SpellAttr6.CastByCharmer) && caster.GetCharmerOrOwner() != null ? caster.GetCharmerOrOwner() : caster); m_spellValue = new SpellValue(m_spellInfo, caster); m_castItemLevel = -1; + + if (IsIgnoringCooldowns()) + m_castFlagsEx |= SpellCastFlagsEx.IgnoreCooldown; + m_castId = ObjectGuid.Create(HighGuid.Cast, SpellCastSource.Normal, m_caster.GetMapId(), m_spellInfo.Id, m_caster.GetMap().GenerateLowGuid(HighGuid.Cast)); m_originalCastId = originalCastId; m_SpellVisual.SpellXSpellVisualID = caster.GetCastSpellXSpellVisualId(m_spellInfo);