Module unit.Aura

This is the Unit aura module.

Functions

Unit:Auras (isBuff, anyCaster) Retrieves all auras (buffs or debuffs) on the unit.
Unit:AuraInfo (spell, isBuff, anyCaster) Retrieves detailed information about a specific aura (buff or debuff) on the unit.
Unit:BuffInfo (spell, anyCaster) Retrieves detailed information about a specific buff on the unit.
Unit:BuffStack (spell, anyCaster, bypassRecovery) Returns the current stack count of a specific buff on the unit.
Unit:BuffDuration (spell, anyCaster) Returns the total duration of a specific buff on the unit.
Unit:BuffRemains (spell, anyCaster, bypassRecovery) Returns the remaining duration of a specific buff on the unit.
Unit:BuffUp (spell, anyCaster, bypassRecovery) Checks if a specific buff is currently active on the unit.
Unit:BuffDown (spell, anyCaster, bypassRecovery) Checks if a specific buff is currently not active on the unit.
Unit:BuffRefreshable (spell, anyCaster, bypassRecovery) Checks if a specific buff is refreshable within its pandemic window.
Unit:BuffTicksRemain (spell, anyCaster, bypassRecovery) Returns the number of ticks remaining for a specific buff on the unit.
Unit:BuffTime (spell, anyCaster) Returns the elapsed time since a specific buff was applied on the unit.
Unit:DebuffInfo (spell, anyCaster) Retrieves detailed information about a specific debuff on the unit.
Unit:DebuffStack (spell, anyCaster, bypassRecovery) Returns the current stack count of a specific debuff on the unit.
Unit:DebuffDuration (spell, anyCaster) Returns the total duration of a specific debuff on the unit.
Unit:DebuffRemains (spell, anyCaster, bypassRecovery) Returns the remaining duration of a specific debuff on the unit.
Unit:DebuffUp (spell, anyCaster, bypassRecovery) Checks if a specific debuff is currently active on the unit.
Unit:DebuffDown (spell, anyCaster, bypassRecovery) Checks if a specific debuff is currently not active on the unit.
Unit:DebuffRefreshable (spell, pandemicThreshold, anyCaster, bypassRecovery) Checks if a specific debuff is refreshable within its pandemic window.
Unit:DebuffTicksRemain (spell, anyCaster, bypassRecovery) Returns the number of ticks remaining for a specific debuff on the unit.
Unit:DebuffTime (spell, anyCaster) Returns the elapsed time since a specific debuff was applied on the unit.
Unit:BloodlustRemains (bypassRecovery) Returns the remaining duration of any Bloodlust/Heroism-like buff on the unit.
Unit:BloodlustUp (bypassRecovery) Checks if any Bloodlust/Heroism-like buff is currently active on the unit.
Unit:BloodlustDown (bypassRecovery) Checks if no Bloodlust/Heroism-like buff is currently active on the unit.
Unit:PowerInfusionRemains (bypassRecovery) Returns the remaining duration of Power Infusion on the unit.
Unit:PowerInfusionUp (bypassRecovery) Checks if Power Infusion is currently active on the unit.
Unit:PowerInfusionDown (bypassRecovery) Checks if Power Infusion is currently not active on the unit.
Unit:BloodlustExhaustRemains (bypassRecovery) Returns the remaining duration of the Bloodlust/Heroism exhaustion debuff on the unit.
Unit:BloodlustExhaustUp (bypassRecovery) Checks if the Bloodlust/Heroism exhaustion debuff is currently active on the unit.
Unit:BloodlustExhaustDown (bypassRecovery) Checks if the Bloodlust/Heroism exhaustion debuff is currently not active on the unit.
Unit:EnemyAbsorb () Checks if the unit has any known enemy absorb shield active.
Unit:IsDispellable (dispelActions) Checks if a debuff on the unit is dispellable by any of the provided dispel actions.
Unit:IsPurgable (purgeActions) Checks if a buff on the unit is purgable by any of the provided purge actions.
Unit:IsDesnarable (desnareActions) Checks if a debuff on the unit is "desnarable" (can be removed by a desnare-type ability).
Unit:IsStunned () Checks if the unit is currently stunned by any known stun debuff.
API.IsGroupBuffMissing (buff) Checks if a specific group buff is missing from any eligible friend in the current group.
API.BuffCount (units, id) Counts the number of units in a given list that have a specific buff active.
API.DebuffCount (units, id) Counts the number of units in a given list that have a specific debuff active.


Functions

Unit:Auras (isBuff, anyCaster)
Retrieves all auras (buffs or debuffs) on the unit.

Parameters:

  • isBuff boolean True to retrieve buffs, false to retrieve debuffs.
  • anyCaster boolean True to include auras from any caster, false to include only auras from player or pet.

Returns:

    table A table of aura information. Each aura is a table with details like spellId, sourceUnit, etc.
Unit:AuraInfo (spell, isBuff, anyCaster)
Retrieves detailed information about a specific aura (buff or debuff) on the unit.

Parameters:

  • spell number|table|string The spell ID (number), a table with an 'id' field, or the spell name (string).
  • isBuff boolean True to search for a buff, false to search for a debuff.
  • anyCaster boolean True to include auras from any caster, false to include only auras from player or pet.

Returns:

    table|nil A table containing aura information if found, otherwise nil.
Unit:BuffInfo (spell, anyCaster)
Retrieves detailed information about a specific buff on the unit.

Parameters:

  • spell number|table|string The spell ID (number), a table with an 'id' field, or the spell name (string).
  • anyCaster boolean True to include buffs from any caster, false to include only buffs from player or pet.

Returns:

    table|nil A table containing buff information if found, otherwise nil.

See also:

Unit:BuffStack (spell, anyCaster, bypassRecovery)
Returns the current stack count of a specific buff on the unit.

Parameters:

  • spell number|table|string The spell ID (number), a table with an 'id' field, or the spell name (string).
  • anyCaster boolean True to include buffs from any caster, false to include only buffs from player or pet.
  • bypassRecovery boolean True to bypass recovery time when checking buff status.

Returns:

    number The number of applications (stacks) of the buff, or 0 if the buff is not up.
Unit:BuffDuration (spell, anyCaster)
Returns the total duration of a specific buff on the unit.

Parameters:

  • spell number|table|string The spell ID (number), a table with an 'id' field, or the spell name (string).
  • anyCaster boolean True to include buffs from any caster, false to include only buffs from player or pet.

Returns:

    number The total duration of the buff in seconds, or 0 if the buff is not up.
Unit:BuffRemains (spell, anyCaster, bypassRecovery)
Returns the remaining duration of a specific buff on the unit.

Parameters:

  • spell number|table|string The spell ID (number), a table with an 'id' field, or the spell name (string).
  • anyCaster boolean True to include buffs from any caster, false to include only buffs from player or pet.
  • bypassRecovery boolean True to bypass recovery time in the calculation.

Returns:

    number The remaining duration of the buff in seconds, or 0 if the buff is not up. Returns 9999 for buffs with infinite duration.
Unit:BuffUp (spell, anyCaster, bypassRecovery)
Checks if a specific buff is currently active on the unit.

Parameters:

  • spell number|table|string The spell ID (number), a table with an 'id' field, or the spell name (string).
  • anyCaster boolean True to include buffs from any caster, false to include only buffs from player or pet.
  • bypassRecovery boolean True to bypass recovery time when checking buff status.

Returns:

    boolean True if the buff is active, false otherwise.
Unit:BuffDown (spell, anyCaster, bypassRecovery)
Checks if a specific buff is currently not active on the unit.

Parameters:

  • spell number|table|string The spell ID (number), a table with an 'id' field, or the spell name (string).
  • anyCaster boolean True to include buffs from any caster, false to include only buffs from player or pet.
  • bypassRecovery boolean True to bypass recovery time when checking buff status.

Returns:

    boolean True if the buff is not active, false otherwise.
Unit:BuffRefreshable (spell, anyCaster, bypassRecovery)
Checks if a specific buff is refreshable within its pandemic window.

Parameters:

  • spell table The spell table, which should have a `PandemicThreshold` method.
  • anyCaster boolean True to include buffs from any caster, false to include only buffs from player or pet.
  • bypassRecovery boolean True to bypass recovery time when checking buff status.

Returns:

    boolean True if the buff is refreshable, false otherwise.
Unit:BuffTicksRemain (spell, anyCaster, bypassRecovery)
Returns the number of ticks remaining for a specific buff on the unit.

Parameters:

  • spell table The spell table, which should have a `TickTime` method.
  • anyCaster boolean True to include buffs from any caster, false to include only buffs from player or pet.
  • bypassRecovery boolean True to bypass recovery time when checking buff status.

Returns:

    number The number of ticks remaining, or 0 if the buff is not up or doesn't tick.
Unit:BuffTime (spell, anyCaster)
Returns the elapsed time since a specific buff was applied on the unit.

Parameters:

  • spell number|table|string The spell ID (number), a table with an 'id' field, or the spell name (string).
  • anyCaster boolean True to include buffs from any caster, false to include only buffs from player or pet.

Returns:

    number The elapsed time in seconds, or 0 if the buff is not up.
Unit:DebuffInfo (spell, anyCaster)
Retrieves detailed information about a specific debuff on the unit.

Parameters:

  • spell number|table|string The spell ID (number), a table with an 'id' field, or the spell name (string).
  • anyCaster boolean True to include debuffs from any caster, false to include only debuffs from player or pet.

Returns:

    table|nil A table containing debuff information if found, otherwise nil.

See also:

Unit:DebuffStack (spell, anyCaster, bypassRecovery)
Returns the current stack count of a specific debuff on the unit.

Parameters:

  • spell number|table|string The spell ID (number), a table with an 'id' field, or the spell name (string).
  • anyCaster boolean True to include debuffs from any caster, false to include only debuffs from player or pet.
  • bypassRecovery boolean True to bypass recovery time when checking debuff status.

Returns:

    number The number of applications (stacks) of the debuff, or 0 if the debuff is not up.
Unit:DebuffDuration (spell, anyCaster)
Returns the total duration of a specific debuff on the unit.

Parameters:

  • spell number|table|string The spell ID (number), a table with an 'id' field, or the spell name (string).
  • anyCaster boolean True to include debuffs from any caster, false to include only debuffs from player or pet.

Returns:

    number The total duration of the debuff in seconds, or 0 if the debuff is not up.
Unit:DebuffRemains (spell, anyCaster, bypassRecovery)
Returns the remaining duration of a specific debuff on the unit.

Parameters:

  • spell number|table|string The spell ID (number), a table with an 'id' field, or the spell name (string).
  • anyCaster boolean True to include debuffs from any caster, false to include only debuffs from player or pet.
  • bypassRecovery boolean True to bypass recovery time in the calculation.

Returns:

    number The remaining duration of the debuff in seconds, or 0 if the debuff is not up. Returns 9999 for debuffs with infinite duration.
Unit:DebuffUp (spell, anyCaster, bypassRecovery)
Checks if a specific debuff is currently active on the unit.

Parameters:

  • spell number|table|string The spell ID (number), a table with an 'id' field, or the spell name (string).
  • anyCaster boolean True to include debuffs from any caster, false to include only debuffs from player or pet.
  • bypassRecovery boolean True to bypass recovery time when checking debuff status.

Returns:

    boolean True if the debuff is active, false otherwise.
Unit:DebuffDown (spell, anyCaster, bypassRecovery)
Checks if a specific debuff is currently not active on the unit.

Parameters:

  • spell number|table|string The spell ID (number), a table with an 'id' field, or the spell name (string).
  • anyCaster boolean True to include debuffs from any caster, false to include only debuffs from player or pet.
  • bypassRecovery boolean True to bypass recovery time when checking debuff status.

Returns:

    boolean True if the debuff is not active, false otherwise.
Unit:DebuffRefreshable (spell, pandemicThreshold, anyCaster, bypassRecovery)
Checks if a specific debuff is refreshable within its pandemic window.

Parameters:

  • spell table The spell table, which should have a `PandemicThreshold` method.
  • pandemicThreshold number|nil An optional custom pandemic threshold. If nil, `spell:PandemicThreshold()` is used.
  • anyCaster boolean True to include debuffs from any caster, false to include only debuffs from player or pet.
  • bypassRecovery boolean True to bypass recovery time when checking debuff status.

Returns:

    boolean True if the debuff is refreshable, false otherwise.
Unit:DebuffTicksRemain (spell, anyCaster, bypassRecovery)
Returns the number of ticks remaining for a specific debuff on the unit.

Parameters:

  • spell table The spell table, which should have a `TickTime` method.
  • anyCaster boolean True to include debuffs from any caster, false to include only debuffs from player or pet.
  • bypassRecovery boolean True to bypass recovery time when checking debuff status.

Returns:

    number The number of ticks remaining, or 0 if the debuff is not up or doesn't tick.
Unit:DebuffTime (spell, anyCaster)
Returns the elapsed time since a specific debuff was applied on the unit.

Parameters:

  • spell number|table|string The spell ID (number), a table with an 'id' field, or the spell name (string).
  • anyCaster boolean True to include debuffs from any caster, false to include only debuffs from player or pet.

Returns:

    number The elapsed time in seconds, or 0 if the debuff is not up.
Unit:BloodlustRemains (bypassRecovery)
Returns the remaining duration of any Bloodlust/Heroism-like buff on the unit. This includes abilities like Bloodlust, Heroism, Time Warp, and various drums.

Parameters:

  • bypassRecovery boolean True to bypass recovery time in the calculation.

Returns:

    number The remaining duration in seconds, or 0 if no such buff is active.
Unit:BloodlustUp (bypassRecovery)
Checks if any Bloodlust/Heroism-like buff is currently active on the unit.

Parameters:

  • bypassRecovery boolean True to bypass recovery time when checking buff status.

Returns:

    boolean True if any Bloodlust/Heroism-like buff is active, false otherwise.
Unit:BloodlustDown (bypassRecovery)
Checks if no Bloodlust/Heroism-like buff is currently active on the unit.

Parameters:

  • bypassRecovery boolean True to bypass recovery time when checking buff status.

Returns:

    boolean True if no Bloodlust/Heroism-like buff is active, false otherwise.
Unit:PowerInfusionRemains (bypassRecovery)
Returns the remaining duration of Power Infusion on the unit.

Parameters:

  • bypassRecovery boolean True to bypass recovery time in the calculation.

Returns:

    number The remaining duration in seconds, or 0 if Power Infusion is not active.
Unit:PowerInfusionUp (bypassRecovery)
Checks if Power Infusion is currently active on the unit.

Parameters:

  • bypassRecovery boolean True to bypass recovery time when checking buff status.

Returns:

    boolean True if Power Infusion is active, false otherwise.
Unit:PowerInfusionDown (bypassRecovery)
Checks if Power Infusion is currently not active on the unit.

Parameters:

  • bypassRecovery boolean True to bypass recovery time when checking buff status.

Returns:

    boolean True if Power Infusion is not active, false otherwise.
Unit:BloodlustExhaustRemains (bypassRecovery)
Returns the remaining duration of the Bloodlust/Heroism exhaustion debuff on the unit.

Parameters:

  • bypassRecovery boolean True to bypass recovery time in the calculation.

Returns:

    number The remaining duration in seconds, or 0 if no such debuff is active.
Unit:BloodlustExhaustUp (bypassRecovery)
Checks if the Bloodlust/Heroism exhaustion debuff is currently active on the unit.

Parameters:

  • bypassRecovery boolean True to bypass recovery time when checking debuff status.

Returns:

    boolean True if the exhaustion debuff is active, false otherwise.
Unit:BloodlustExhaustDown (bypassRecovery)
Checks if the Bloodlust/Heroism exhaustion debuff is currently not active on the unit.

Parameters:

  • bypassRecovery boolean True to bypass recovery time when checking debuff status.

Returns:

    boolean True if the exhaustion debuff is not active, false otherwise.
Unit:EnemyAbsorb ()
Checks if the unit has any known enemy absorb shield active.

Returns:

    boolean True if an enemy absorb shield is active, false otherwise.
Unit:IsDispellable (dispelActions)
Checks if a debuff on the unit is dispellable by any of the provided dispel actions.

Parameters:

  • dispelActions table|nil A table of dispel actions. If nil, `Private.ActionEngine.apl.dispels` is used.

Returns:

  1. boolean True if a dispellable debuff is found, false otherwise.
  2. string|nil The dispel name of the found debuff (e.g., "Magic", "Curse").
  3. number|nil The stack count of the found debuff.
  4. number|nil The remaining duration of the found debuff.
Unit:IsPurgable (purgeActions)
Checks if a buff on the unit is purgable by any of the provided purge actions.

Parameters:

  • purgeActions table|nil A table of purge actions. If nil, `Private.ActionEngine.apl.purges` is used.

Returns:

  1. boolean True if a purgable buff is found, false otherwise.
  2. string|nil The purge name (type) of the found buff (e.g., "Magic", "Enrage").
  3. number|nil The stack count of the found buff.
  4. number|nil The remaining duration of the found buff.
Unit:IsDesnarable (desnareActions)
Checks if a debuff on the unit is "desnarable" (can be removed by a desnare-type ability).

Parameters:

  • desnareActions table|nil A table of desnare actions. If nil, `Private.ActionEngine.apl.desnares` is used.

Returns:

  1. boolean True if a desnarable debuff is found, false otherwise.
  2. number|nil The stack count of the found debuff.
  3. number|nil The remaining duration of the found debuff.
Unit:IsStunned ()
Checks if the unit is currently stunned by any known stun debuff.

Returns:

    boolean True if the unit is stunned, false otherwise.
API.IsGroupBuffMissing (buff)
Checks if a specific group buff is missing from any eligible friend in the current group.

Parameters:

  • buff table The spell table of the buff to check, which should have an `ID` method.

Returns:

    boolean True if the buff is missing from at least one eligible friend, false otherwise.
API.BuffCount (units, id)
Counts the number of units in a given list that have a specific buff active.

Parameters:

  • units table A table of unit objects.
  • id number The spell ID of the buff to count.

Returns:

    number The total count of units with the specified buff.
API.DebuffCount (units, id)
Counts the number of units in a given list that have a specific debuff active.

Parameters:

  • units table A table of unit objects.
  • id number The spell ID of the debuff to count.

Returns:

    number The total count of units with the specified debuff.
generated by LDoc 1.5.0 Last updated 2025-08-07 15:27:51