From 88c12b45d0adbe7ca18a72a53cb1416b1621975b Mon Sep 17 00:00:00 2001 From: ariel- Date: Sat, 22 Apr 2017 04:00:49 -0300 Subject: Core/Spell: fix creature focus with channeled spells - Remove one not needed ReleaseFocus, this is done at finish already --- src/server/game/Spells/Spell.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index e93a7770180..f40607c391c 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -3280,9 +3280,6 @@ void Spell::_cast(bool skipCheck) SetExecutedCurrently(false); - if (Creature* creatureCaster = m_caster->ToCreature()) - creatureCaster->ReleaseFocus(this); - if (!m_originalCaster) return; @@ -4338,8 +4335,14 @@ void Spell::SendChannelStart(uint32 duration) m_timer = duration; if (channelTarget) + { m_caster->SetChannelObjectGuid(channelTarget); + if (Creature* creatureCaster = m_caster->ToCreature()) + if (!creatureCaster->IsFocusing(this)) + creatureCaster->FocusTarget(this, ObjectAccessor::GetWorldObject(*creatureCaster, channelTarget)); + } + m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL, m_spellInfo->Id); } -- cgit v1.2.3