WoW:API UnitAura: Difference between revisions

Expanded on the two flavors of UnitAura (name vs index)
(clarif.)
(Expanded on the two flavors of UnitAura (name vs index))
Line 7: Line 7:
   = UnitAura("unit", index or "name"[, "rank"[, "filter"]])
   = UnitAura("unit", index or "name"[, "rank"[, "filter"]])


Either use:
If the second parameter is a string, then the third parameter is the rank (which can be nil)
'''unit''', '''index'''/'''name''' and '''filter'''
<dl>
or
<dt>Either use:
'''unit''', '''index'''/'''name''', '''rank''' and '''filter'''.
<dd>'''unit''', '''index''', '''filter'''
<dt>or
<dd>'''unit''', '''name''', '''rank''', '''filter'''</dl>
 
'''Examples''':<ul>
<li>UnitAura("target", 1) -- First buff on target
<li>UnitAura("target", 1, "PLAYER|HARMFUL") -- First debuff, cast by the player, on the target
<li>UnitAura("player", "Lightning Shield") -- first instance of "Lightning Shield" on the player
<li>UnitAura("player", "Lightning Shield", nil, "PLAYER|HELPFUL") -- first instance of "Lightning Shield" on the player, cast by the player
<li>UnitAura("player", "Lightning Shield", "Rank 2") -- first instance of "Lightning Shield", rank 2, on the player</ul>


== Arguments ==
== Arguments ==
Anonymous user