diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-04-22 04:00:49 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2017-04-22 04:00:49 -0300 |
commit | 88c12b45d0adbe7ca18a72a53cb1416b1621975b (patch) | |
tree | 4d80e5d732652349cdfeab73cc9e8fd794a4eb80 /src | |
parent | 0fe66b4c51944a775ea91dbeff31cd5decc8a918 (diff) |
Core/Spell: fix creature focus with channeled spells
- Remove one not needed ReleaseFocus, this is done at finish already
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
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); } |