Module action.spell.Main

This is the spell module.

Functions

ID () Returns the ID of the spell.
Name () Returns the name of the spell.
Texture () Returns the texture path of the spell.
MinimumRange () Returns the minimum range of the spell.
MaximumRange () Returns the maximum range of the spell.
IsMelee () Checks if the spell is a melee spell.
InfoByID () Returns comprehensive information about the spell by its ID.
InfoByName () Returns comprehensive information about the spell by its name.
TimeSinceLastCast () Returns the time elapsed since the spell was last cast.
TimeSinceLastAppliedOnPlayer () Returns the time elapsed since the spell's aura was last applied on the player.
TimeSinceLastRemovedOnPlayer () Returns the time elapsed since the spell's aura was last removed from the player.
IsAvailable (boolean) Checks if the spell is available to the player.
IsKnown (boolean) Checks if the spell is known by the player or pet.
IsPetKnown () Checks if the spell is known by the pet.
IsUsable () Checks if the spell is usable by the game client (e.g., not on cooldown, sufficient resources).
IsUsableP (number) Checks if the spell is usable considering power costs and an optional offset.
IsUsablePPool (number) Checks if the spell is usable considering only the primary power pool cost.
IsLearned () Checks if the spell is learned by the player.
Count () Returns the total number of times the spell has been cast.
IsCastable (boolean) Checks if the spell is castable (learned and not on cooldown).
IsReady (boolean) Checks if the spell is ready to be cast (castable, usable, and meets action settings).
CastTime () Returns the cast time of the spell in seconds.
ExecuteTime () Returns the total execute time for the spell, considering cast time and GCD.
ExecuteRemains () Returns the remaining execute time for the spell if currently casting.
CostTable () Returns the spell's power cost table.
CostInfo (number, string) Returns specific cost information from the spell's cost table.
Cost (number) Returns the cost of the spell.
TalentRank () Returns the talent rank of the spell for the player.
BaseDuration () Returns the base duration of the spell's effect in seconds.
MaxDuration () Returns the maximum duration of the spell's effect in seconds.
PandemicThreshold () Returns the pandemic threshold for the spell's duration in seconds (30% of base duration).
GCD () Returns the global cooldown (GCD) for the spell in seconds.
TravelTime (Unit) Calculates the travel time of the spell's projectile to a target unit.
IsInFlight () Checks if the spell's projectile is currently in flight.


Functions

ID ()
Returns the ID of the spell.

Returns:

    number The spell ID.
Name ()
Returns the name of the spell.

Returns:

    string The spell name.
Texture ()
Returns the texture path of the spell.

Returns:

    string The spell texture path.
MinimumRange ()
Returns the minimum range of the spell.

Returns:

    number The minimum range.
MaximumRange ()
Returns the maximum range of the spell.

Returns:

    number The maximum range.
IsMelee ()
Checks if the spell is a melee spell.

Returns:

    boolean True if the spell is melee, false otherwise.
InfoByID ()
Returns comprehensive information about the spell by its ID.

Returns:

    table Spell information.
InfoByName ()
Returns comprehensive information about the spell by its name.

Returns:

    table Spell information.
TimeSinceLastCast ()
Returns the time elapsed since the spell was last cast.

Returns:

    number Time in seconds since last cast.
TimeSinceLastAppliedOnPlayer ()
Returns the time elapsed since the spell's aura was last applied on the player.

Returns:

    number Time in seconds since last applied.
TimeSinceLastRemovedOnPlayer ()
Returns the time elapsed since the spell's aura was last removed from the player.

Returns:

    number Time in seconds since last removed.
IsAvailable (boolean)
Checks if the spell is available to the player.

Parameters:

  • boolean checkPet If true, checks if the spell is known by the pet.

Returns:

    boolean True if the spell is available, false otherwise.
IsKnown (boolean)
Checks if the spell is known by the player or pet.

Parameters:

  • boolean checkPet If true, checks if the spell is known by the pet.

Returns:

    boolean True if the spell is known, false otherwise.
IsPetKnown ()
Checks if the spell is known by the pet.

Returns:

    boolean True if the spell is known by the pet, false otherwise.
IsUsable ()
Checks if the spell is usable by the game client (e.g., not on cooldown, sufficient resources).

Returns:

    boolean True if the spell is usable, false otherwise.
IsUsableP (number)
Checks if the spell is usable considering power costs and an optional offset.

Parameters:

  • number offset Optional. An additional cost offset to consider for resource checks.

Returns:

    boolean True if the spell is usable, false otherwise.
IsUsablePPool (number)
Checks if the spell is usable considering only the primary power pool cost.

Parameters:

  • number offset Optional. An additional cost offset to consider for resource checks.

Returns:

    boolean True if the spell is usable, false otherwise.
IsLearned ()
Checks if the spell is learned by the player.

Returns:

    boolean True if the spell is learned, false otherwise.
Count ()
Returns the total number of times the spell has been cast.

Returns:

    number The spell cast count.
IsCastable (boolean)
Checks if the spell is castable (learned and not on cooldown).

Parameters:

  • boolean bypassRecovery Optional. If true, bypasses recovery checks.

Returns:

    boolean True if the spell is castable, false otherwise.
IsReady (boolean)
Checks if the spell is ready to be cast (castable, usable, and meets action settings).

Parameters:

  • boolean showNameplateIcon Optional. Influences action setting check.

Returns:

    boolean True if the spell is ready, false otherwise.
CastTime ()
Returns the cast time of the spell in seconds.

Returns:

    number The cast time in seconds.
ExecuteTime ()
Returns the total execute time for the spell, considering cast time and GCD. This is the maximum of the spell's cast time and the player's global cooldown.

Returns:

    number The execute time in seconds.
ExecuteRemains ()
Returns the remaining execute time for the spell if currently casting. This is the maximum of the remaining cast time and remaining GCD.

Returns:

    number The remaining execute time in seconds.
CostTable ()
Returns the spell's power cost table.

Returns:

    table A table containing power cost information.
CostInfo (number, string)
Returns specific cost information from the spell's cost table.

Parameters:

  • number index Optional. The index of the cost entry in the table. Defaults to 1, or 2 if the first entry is type 4 and second is type 3.
  • string key The key for the desired cost information (e.g., "cost", "type", "minCost").

Returns:

    any The value associated with the key, or nil if not found.
Cost (number)
Returns the cost of the spell.

Parameters:

  • number index Optional. The index of the cost entry in the table.

Returns:

    number The spell's cost, or 0 if not found.
TalentRank ()
Returns the talent rank of the spell for the player.

Returns:

    number The talent rank, or 0 if not a talent.
BaseDuration ()
Returns the base duration of the spell's effect in seconds.

Returns:

    number The base duration in seconds.
MaxDuration ()
Returns the maximum duration of the spell's effect in seconds.

Returns:

    number The maximum duration in seconds.
PandemicThreshold ()
Returns the pandemic threshold for the spell's duration in seconds (30% of base duration).

Returns:

    number The pandemic threshold in seconds.
GCD ()
Returns the global cooldown (GCD) for the spell in seconds.

Returns:

    number The GCD in seconds.
TravelTime (Unit)
Calculates the travel time of the spell's projectile to a target unit.

Parameters:

  • Unit unit Optional. The target unit. If nil, uses the current target.

Returns:

    number The travel time in seconds.
IsInFlight ()
Checks if the spell's projectile is currently in flight.

Returns:

    boolean True if the projectile is in flight, false otherwise.
generated by LDoc 1.5.0 Last updated 2025-08-07 15:27:51