castable
Returns true if the spell sent can in fact be cast, false if not.
castable(spellID, unitID / object) : boolean
- SpellID from the class spellbooks
- See Wowpedia for more information on WoW Unit IDs.
- use of object is also supported for unit.
Example
if castable(Frostbolt, 'target') then return cast(Frostbolt, 'target')end
Note
The following is reviewed when calling this function:
resolveSpellID(dpellID)IsSpellKnown(spellID)UnitExists(unit / object)distanceCheck(unit, spellID) -- checks spell range from player to targetcanSee(unit) channeling('player') IsUsableSpell(spellID)cooldown(spellID)