API UnitAura

Retrieve info about an aura (a buff or debuff). name, icon, count, debuffType, duration, expirationTime, source, isStealable, nameplateShowPersonal spellId, canApplyAura, isBossDebuff, castByPlayer, nameplateShowAll, timeMod, ... = UnitAura(unit, index [, filter]) = UnitBuff(unit, index [, filter]) = UnitDebuff(unit, index [, filter])

Arguments

 * unit : - UnitId to query.
 * index : - Index incremented from 1 until no more results.
 * filter : - Optional, case-insensitive filters separated by spaces or pipes.
 * UnitAura uses all filters in the table below.
 * UnitBuff implies HELPFUL and ignores HARMFUL.
 * UnitDebuff implies HARMFUL and ignores HELPFUL.

Details

 * When multiple filters are used, results will be the intersection of each. Thus, mutually-exclusive filters (  or  ) always return nothing.
 * Returns nil when there are no results for a given set of arguments.

Examples
The third aura on the player, without any filtering: UnitAura("target", 3)

Two equivalent ways to obtain the first debuff cast by the player on the target: UnitAura("target", 1, "PLAYER HARMFUL") UnitDebuff("target", 1, "PLAYER")

Printing the names of any stealable buffs on the current target, or advising that none are stealable: /run local y,n,s,_ for i=1,40 do n,_,_,_,_,_,_,s=UnitAura("target",i)if s then print(n.." on target, steal it!")y=1 end end if y~=1 then print("No stealable buffs.")end