C_Spell.IsSpellInRange

From Warcraft Wiki
Jump to navigation Jump to search

Returns true if the current target is within range of the spell; False if out of range; Nil if range check was invalid

inRange = C_Spell.IsSpellInRange(spellIdentifier [, targetUnit])

Arguments

spellIdentifier
number|string : SpellIdentifier
targetUnit
string? : UnitToken - Optional specific target; If not supplied, player's current target (if any) will be used

Returns

inRange
boolean? - May be nil if the range check was invalid, ie due to invalid spell, missing/invalid target, unknown spell, etc