From 36a8844acc197ad82af7a5ce5ff604bba6f6d3c6 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Sat, 22 Aug 2020 13:02:17 -0400 Subject: [PATCH] Creatures now release spell focus on projectile launch (for spells that have a projectile portion) as opposed to projectile impact. Port From (https://github.com/TrinityCore/TrinityCore/commit/bacc5ef94ec0f064248b871646d88955da04b725) --- Source/Game/Spells/Spell.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index 814a6e041..ea5e8fd0a 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -2838,6 +2838,13 @@ namespace Game.Spells // we must send smsg_spell_go packet before m_castItem delete in TakeCastItem()... SendSpellGo(); + if (!m_spellInfo.IsChanneled()) + { + Creature creatureCaster = m_caster.ToCreature(); + if (creatureCaster != null) + creatureCaster.ReleaseFocus(this); + } + // Okay, everything is prepared. Now we need to distinguish between immediate and evented delayed spells if ((m_spellInfo.HasHitDelay() && !m_spellInfo.IsChanneled()) || m_spellInfo.HasAttribute(SpellAttr4.Unk4)) {