m
{{wowapi}}
m ({{wowapi}}) |
|||
| Line 1: | Line 1: | ||
{{wowapi}} | |||
Test whether an action is in range for use. | Test whether an action is in range for use. | ||
inRange = IsActionInRange(actionSlot) | inRange = IsActionInRange(actionSlot); | ||
== Parameters == | == Parameters == | ||
=== Arguments === | === Arguments === | ||
:;actionSlot : Numeric - The [[API TYPE ActionSlot|action slot]] to test. | :;actionSlot : Numeric - The [[API TYPE ActionSlot|action slot]] to test. | ||
=== Returns === | === Returns === | ||
:;inRange : Flag - nil if the slot has no action or if there is no current target. 0 if the action is out of range, and 1 if the action is in range. Note that it always returns 1 if range does not apply to this action or if you can't use the spell on the target. | :;inRange : Flag - nil if the slot has no action or if there is no current target. 0 if the action is out of range, and 1 if the action is in range. Note that it always returns 1 if range does not apply to this action or if you can't use the spell on the target. | ||
| Line 17: | Line 12: | ||
If you need more performance than target switching and checking with IsActionInRange provides then check out [[API_CheckInteractDistance|CheckInteractDistance]]. It has certain limits and will not work for all ranges, but it is several orders of magnitude faster than target switching/scanning. | If you need more performance than target switching and checking with IsActionInRange provides then check out [[API_CheckInteractDistance|CheckInteractDistance]]. It has certain limits and will not work for all ranges, but it is several orders of magnitude faster than target switching/scanning. | ||