aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortreeston <treeston.mmoc@gmail.com>2017-07-03 00:17:31 +0200
committerShauren <shauren.trinity@gmail.com>2020-08-18 18:53:13 +0200
commitbacc5ef94ec0f064248b871646d88955da04b725 (patch)
treea88d726dd6fb8778ed48a8207789e00824b3014a /src
parent71db17220ae67dc6a354e88451ffc0700fe6c5f9 (diff)
Creatures now release spell focus on projectile launch (for spells that have a projectile portion) as opposed to projectile impact.
This should make some very slow projectiles (f.ex. Professor Putricide's Malleable Goo) a lot smoother. (cherry picked from commit 5d3c69bf441afb5dc0a6a20c0d7cd375178d2aa8)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Spell.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 739222a0272..84695d84eda 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -3315,6 +3315,10 @@ void Spell::_cast(bool skipCheck)
// we must send smsg_spell_go packet before m_castItem delete in TakeCastItem()...
SendSpellGo();
+ if (!m_spellInfo->IsChanneled())
+ if (Creature* creatureCaster = m_caster->ToCreature())
+ 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(SPELL_ATTR4_UNK4))
{