Skip to main content

Spell Overview

The Spell class provides a comprehensive interface for handling spells in World of Warcraft. It includes functionality for checking spell availability, casting spells, managing cooldowns, and handling various spell-specific behaviors.

Important Note About Checks

Several checks are automatically performed in the cast() and smartaoe() functions, making manual checks redundant. These include:

  • ready() - No need to check if spell is ready before casting
  • castable(unit) - No need to check if spell is castable before casting
  • isusable() - No need to check if spell is usable before casting
  • inrange(unit) - No need to check range before casting
  • unit.distance - No need to check distance before casting
  • unit.los - No need to check line of sight before casting
  • unit.facing - No need to check facing before casting

Incorrect Usage:

if spell:ready() and spell:castable("target") and target.los and target.distanceto(player) < 40 then
spell:cast("target") -- Redundant checks!
end

Correct Usage:

spell:cast("target") -- All necessary checks are performed internally

Installation

local spell = Aurora.SpellHandler.NewSpell(spellID, payload)

Parameters

ParameterTypeDescription
spellIDnumber | number[]Single spell ID or array of spell IDs for different ranks
payloadtableOptional configuration settings