Core/Spell: abort channeling if no valid targets are found after searching

Closes #17624
This commit is contained in:
ariel-
2017-05-27 01:40:14 -03:00
parent d9a1c82ab4
commit 2f19d97d21

View File

@@ -768,6 +768,14 @@ void Spell::SelectSpellTargets()
if (m_spellInfo->IsChanneled())
{
// maybe do this for all spells?
if (m_UniqueTargetInfo.empty() && m_UniqueGOTargetInfo.empty() && m_UniqueItemInfo.empty())
{
SendCastResult(SPELL_FAILED_BAD_IMPLICIT_TARGETS);
finish(false);
return;
}
uint8 mask = (1 << i);
for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
{