mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/Spells: Allow TARGET_UNIT_CHANNEL_TARGET to target players
(broken in c0eb6c3130)
This commit is contained in:
@@ -990,8 +990,9 @@ void Spell::SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTa
|
||||
WorldObject* target = ObjectAccessor::GetUnit(*m_caster, channelTarget);
|
||||
CallScriptObjectTargetSelectHandlers(target, effIndex, targetType);
|
||||
// unit target may be no longer avalible - teleported out of map for example
|
||||
if (target && target->GetTypeId() == TYPEID_UNIT)
|
||||
AddUnitTarget(target->ToUnit(), 1 << effIndex);
|
||||
Unit* unitTarget = target ? target->ToUnit() : nullptr;
|
||||
if (unitTarget)
|
||||
AddUnitTarget(unitTarget, 1 << effIndex);
|
||||
else
|
||||
TC_LOG_DEBUG("spells", "SPELL: cannot find channel spell target for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user