WowAddons

World of Warcraft Forever API · IsSpellInRange.md, for your AI

IsSpellInRange is not in Forever

An addon that calls it stops at /reload with attempt to call global 'IsSpellInRange' (a nil value). Write C_Spell.IsSpellInRange instead: its arguments and returns may differ from the old IsSpellInRange, read them below.

C_Spell.IsSpellInRange

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

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

Arguments

spellIdentifierSpellIdentifier
targetUnitUnitToken may be nilOptional specific target; If not supplied, player's current target (if any) will be used

Returns

inRangebool may be nilMay be nil if the range check was invalid, ie due to unknown/invalid spell, missing/invalid target, etc

Every other call of the C_Spell system: C_Spell. The WowAddons app checks a whole addon before the game does: wowaddons check names each call Forever lacks and what to write instead.

Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.

It takes WowAddons

Free, for Windows, macOS and Linux: it puts the addon in your game in one click and keeps it up to date. Open it once, then press Install again.

WowAddons runs on your computer: open wowaddons.gg there.

Download for Windows