WoW:API SpellCanTargetUnit: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (Move page script moved page API SpellCanTargetUnit to API SpellCanTargetUnit without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
SpellCanTargetUnit("unit")
{{wowapi}} __NOTOC__


This will check for range, but not for LOS.
 
{{template:WoW API}}
Checks if the spell awaiting target selection can be cast on a specified unit.
canTarget = SpellCanTargetUnit([[UnitId|unitId]])
 
 
== Arguments ==
:unitId : [[UnitId]] - The unit to check.
 
 
== Returns ==
:; canTarget : [[Boolean]] - Whether the spell can target the given unit.
 
 
== Details ==
: This will check for range, but not for LOS.

Latest revision as of 04:47, 15 August 2023

WoW API < SpellCanTargetUnit


Checks if the spell awaiting target selection can be cast on a specified unit.

canTarget = SpellCanTargetUnit(unitId)


Arguments[edit]

unitId : UnitId - The unit to check.


Returns[edit]

canTarget
Boolean - Whether the spell can target the given unit.


Details[edit]

This will check for range, but not for LOS.