Lore archive · Warcraft Wiki, 2023 dump
API UnitAura
Last wiki revision 2023-09-19
Returns the buffs/debuffs for the unit. name, icon, count, dispelType, duration, expirationTime, source, isStealable, nameplateShowPersonal, spellId, canApplyAura, isBossDebuff, castByPlayer, nameplateShowAll, timeMod, ... = UnitAura (unit, index [, filter]) = UnitBuff (unit, index [, filter]) = UnitDebuff(unit, index [, filter])
- unit: : UnitId
- index: - Index of an aura to query.
- filter: - A list of filters, separated by pipe chars or spaces. Otherwise defaults to "HELPFUL".
- UnitBuff is an alias for, returning only buffs.
- UnitDebuff is an alias for, returning only debuffs.
- Returns when there is no aura for that index or when the aura doesn't pass the filter.
- UnitBuff will ignore any HARMFUL filter, and vice versa UnitDebuff will ignore any HELPFUL filter.
- Filters can be mutually exclusive, e.g. will always return nothing.
- On retail a unit can have an unlimited amount of buffs/debuffs.
- The debuff limit is at 16 for Classic Era and 40 for BCC.
If the unit has the Supercharged Chronoboon Displacer buff, then the world buffs can be selected from the return values. For example for Warchief's Blessing:
- Prints the third aura on the target.
/dump UnitAura("target", 1, "PLAYER|HARMFUL") /dump UnitDebuff("target", 1, "PLAYER")
- The following are equivalent. Prints the first debuff applied by the player on the target.
/dump GetPlayerAuraBySpellID(21562)
- is useful for checking only a specific aura on the player character.
AuraUtil.ForEachAura This is recommended for iterating over auras. For example to print all buffs:
The callback function should return once it's fine to stop processing further auras.
AuraUtil.FindAuraByName Finds the first aura that matches the name, but note that:
- Aura names are not unique, this will only find the first match.
- Aura names are localized, what works in one locale might not work in another.
- Remember to specify the "HARMFUL" filter for debuffs.
Source
https://warcraft.wiki.gg/wiki/API_UnitAura · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.