API AuraUtil.FindAuraByName

From Wowpedia
Jump to: navigation, search
"I" iconThis function is implemented by FrameXML in FrameXML/AuraUtil.lua.

Finds the first aura that matches the name.

name, icon, count, debuffType, duration, expirationTime, unitCaster, canStealOrPurge, nameplateShowPersonal, spellId, canApplyAura, isBossDebuff, isCastByPlayer, nameplateShowAll, timeMod, ... = AuraUtil.FindAuraByName(auraName, unit, filter)

Arguments

auraName 
String - localized name of the aura.
unit 
String (unitId) - unit whose auras to query.
filter 
String (optional) - list of filters, separated by spaces or pipes. "HELPFUL" by default. The following filters are available:
HELPFUL - buffs.
HARMFUL - debuffs.
PLAYER - auras that were applied by the player.
RAID - auras that can be applied (if HELPFUL) or dispelled (if HARMFUL) by the player.
CANCELABLE - buffs that can be removed (such as by right-clicking or using the /cancelaura command)
NOT_CANCELABLE - buffs that cannot be removed


Returns

name 
String - name of the aura
icon 
Number (fileID) - identifier of the texture used for the aura's icon.
count 
Number - number of times the aura has been applied to the target, or 0 for auras that do not stack
debuffType 
String - type of the aura ("Magic", "Disease", "Poison", "Curse", or an empty string for Enrage effects), or nil for auras that do not have a type
duration 
Number - full duration of the aura in seconds
expirationTime 
Number - time in seconds (comparable to GetTime()) when the aura will expire
unitCaster 
String (unitId) - unit that applied the aura, or nil if no valid unit token currently represents the caster
canStealOrPurge 
Boolean - true for buffs that can be stolen by mages with [Spellsteal], or false for debuffs and for buffs that cannot be stolen, or for debuffs
nameplateShowPersonal 
Boolean - true for buffs that should be shown on player/pet/vehicle nameplates
spellId 
Number - spell ID of the spell or effect that applied the aura
canApplyAura 
Boolean - true for auras the player can apply (not necessarily if the player did apply the aura, just if the player can apply the aura)
isBossDebuff 
Boolean - true for auras applied by a boss
isCastByPlayer 
Boolean - true for auras applied by players
nameplateShowAll 
Boolean - true for auras that should be shown on all nameplates
timeMod 
Number - scaling factor for time left (appears to always be 1; Blizzard's display code would be incorrect otherwise).
... 
Additional values pertinent to specific aura (HoTs, traps, amounts etc. For example, the first value for Vengeance is its attack power bonus.)

Notes

  • Aura names are not unique
  • Aura names are localized, what works in one locale might not work in another. Consider that in English two auras might have different names, but once localized they have the same name, so even using the localized aura name in a search it could result in different behavior
  • The unit could have multiple auras with the same name, this will only find the first

Patch changes

See also