WoW API: SpellIsTargeting

From AddOn Studio
Revision as of 19:05, 26 August 2006 by WoWWiki>Mikk (Formatting)
Jump to navigation Jump to search

WoW API < SpellIsTargeting

Checks whether a spell is about to be cast, waiting for a target.

isTargeting = SpellIsTargeting();

Parameters

Arguments

none

Returns

isTargeting
Boolean - true if a spell has been cast and is waiting for a target; false otherwise

Example

CastSpellByName("Purify")
if (SpellIsTargeting()) then
  SpellTargetUnit("player")
end

Result

Casts Purify on the current target, if possible; otherwise, casts on the casting player.