WoW:API UnitDebuff: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
Retrieve info about a certain debuff on a certain unit.
Retrieve info about a certain debuff on a certain unit.


  debuffTexture, debuffApplications = UnitDebuff(unitName, debuffIndex);
  debuffTexture, debuffApplications = UnitDebuff(unitName, debuffIndex, showDisepllable);


----
----
Line 25: Line 25:


: The maximum numbers used by the Blizzard code are 16 for party/pet/target debuffs.  
: The maximum numbers used by the Blizzard code are 16 for party/pet/target debuffs.  
:(Boolean showDispellable)
:;showDispellable : Flag <small><i>(optional)</i></small> - Can be 0, 1, or nil. If present and 1, then only debuffs will be returned which are dispellable by the player. Index is still starting with 1 and counting up. (new in 1.9, works in 1.9.3)


----
----

Revision as of 13:35, 8 February 2006

UnitDebuff -Documentation by Sarf-

Retrieve info about a certain debuff on a certain unit.

debuffTexture, debuffApplications = UnitDebuff(unitName, debuffIndex, showDisepllable);

Arguments
(String unitName)
unitName
The name of the unit you wish to retrieve info on
Viable names known:
  • player
  • party1-4
  • raid1-40
  • pet
  • partypet1-4
  • 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/target debuffs.
(Boolean showDispellable)
showDispellable
Flag (optional) - Can be 0, 1, or nil. If present and 1, then only debuffs will be returned which are dispellable by the player. Index is still starting with 1 and counting up. (new in 1.9, works in 1.9.3)

Returns
(String debuffTexture)
debuffTexture
The identifier of (path and filename to) the indicated debuff, or nil if no debuff
(String debuffApplications)
debuffApplications
The number of times the debuff has been applied to the target.

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