Skip to content

aura_stacks

The aura_stacks function retrieves the number of stacks of a specified aura on a unit. This function is useful for tracking the stack count of buffs or debuffs applied to units.

Parameters

  • unit (string): The unit identifier (such as "player", "target", "focus", etc.) for which to retrieve the aura stacks.
  • aura (string): The name or ID of the aura to check.

Returns

  • stacks (number): The number of stacks of the specified aura on the unit.

Example Usage in Lua

Here is an example of how to use the aura_stacks function in Lua:

local api = ...

-- Function to print the number of stacks of a specific aura on the player
function PrintAuraStacks(unit, aura)
    local stacks = api.aura_stacks(unit, aura)
    print("The number of stacks of the aura '" .. aura .. "' on unit '" .. unit .. "' is: " .. stacks)
end

-- Example usage: Print the number of stacks of the "Rejuvenation" aura on the player
PrintAuraStacks("player", "Rejuvenation")