From 53002dfe03012e5f725016da1ac882f9a80e55b6 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 9 Sep 2012 17:52:27 +0200 Subject: [PATCH] Core/Spells: Set UNIT_FIELD_CHANNEL_OBJECT also for spells that don't have explicit target unit but use NEARBY selection, fixes #7246 --- src/server/game/Spells/Spell.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 4d095e0f95..cdf17b0504 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4278,6 +4278,10 @@ void Spell::SendChannelUpdate(uint32 time) void Spell::SendChannelStart(uint32 duration) { uint64 channelTarget = m_targets.GetObjectTargetGUID(); + if (!channelTarget && !m_spellInfo->NeedsExplicitUnitTarget()) + if (m_UniqueTargetInfo.size() + m_UniqueGOTargetInfo.size() == 1) // this is for TARGET_SELECT_CATEGORY_NEARBY + if (!m_UniqueTargetInfo.empty()) + channelTarget = !m_UniqueTargetInfo.empty() ? m_UniqueTargetInfo.front().targetGUID : m_UniqueGOTargetInfo.front().targetGUID; WorldPacket data(MSG_CHANNEL_START, (8+4+4)); data.append(m_caster->GetPackGUID());