mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Core/Spell: abort channeling if no valid targets are found after searching
Closes #17624
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user