WoW:API UnitDebuff: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (add link to table of spells vs textures that can be queried (Hunter only))
Line 47: Line 47:
: [[API UnitBuff|UnitBuff]]
: [[API UnitBuff|UnitBuff]]
: [[UI Questions#Lua_Questions|Why doesn't UnitDebuff accurately report the spell I just cast?]]
: [[UI Questions#Lua_Questions|Why doesn't UnitDebuff accurately report the spell I just cast?]]
: [[Check Hunter Mark|Sample Code Check Hunter's Mark Aspect]]
: [[Queriable Buff effects|List of known buff and debuff effects that can be queried]]
----
----
{{Template:WoW API}}
{{Template:WoW API}}

Revision as of 22:30, 1 January 2005

UnitDebuff -Documentation by Sarf-

Retrieve info about a certain debuff on a certain unit.

debuffTexture = UnitDebuff(unitName, debuffIndex);

Arguments
(String unitName)
unitName
The name of the unit you wish to retrieve info on
Viable names known:
  • party1-4
  • pet
  • target
(Number debuffIndex)
debuffIndex
The index num of the debuff to retrieve info on. Starts at 1 and goes up to (and possibly beyond) a certain number.
The maximum numbers used by the Blizzard code are 16 for party/pet debuffs, 8 for party/pet dedebuffs and 5 for target debuffs and dedebuffs.

Returns
(String debuffTexture)
debuffTexture
The identifier of (path and filename to) the indicated debuff, or nil if no debuff

Example
debuff = UnitDebuff("pet", i);
Result

Retrieves the debuff texture of the pets debuff with the index of "i".


Description
Retrieve info (texture name) about a certain debuff of the specified unit.
See Also
UnitBuff
Why doesn't UnitDebuff accurately report the spell I just cast?
Sample Code Check Hunter's Mark Aspect
List of known buff and debuff effects that can be queried

Template:WoW API