WoW:API CancelUnitBuff: Difference between revisions
Jump to navigation
Jump to search
m (New page: {{wowapi}} Removes a specific buff from the unit. CancelUnitBuff(unit, buffIndex); ---- ;''Arguments'' :;unit: The unitID of the unit. In the case of this function, the uni...) |
(Note about druid forms) |
||
Line 31: | Line 31: | ||
* This function is not protected nor limited in any way to hardware event restriction Blizzard used so far. This function can be called freely from an AddOn to auto-remove a given buff. | * This function is not protected nor limited in any way to hardware event restriction Blizzard used so far. This function can be called freely from an AddOn to auto-remove a given buff. | ||
* This function replaced [[API CancelPlayerBuff|CancelPlayerBuff]] in 3.0. | * This function replaced [[API CancelPlayerBuff|CancelPlayerBuff]] in 3.0. | ||
* This function does not appear to work for canceling druid forms. |
Revision as of 19:58, 26 September 2009
Removes a specific buff from the unit.
CancelUnitBuff(unit, buffIndex or "spell" [,"filter" or "rank"]);
- Arguments
- unit
- The unitID of the unit. In the case of this function, the unit must be "player" (or, possibly, "pet", I have not confirmed) since you cannot cancel other player's buffs.
- buffIndex or "spell"
- buffIndex starts at 1 ends at 40 or "spell" is the name of the spell.
- "filter" or "rank"
- "filter" is any of "HELPFUL|HARMFUL|PLAYER|RAID|CANCELABLE|NOT_CANCELABLE" or "rank" is "Rank 1, 2, etc"
- Not sure exactly what the point of the "filter" option is since you can't cancel a buff that is "HARMFUL" or "NOT_CANCELABLE".
- Example
CancelUnitBuff("player", 1)
- Result
Cancels the buff at index 1 assuming it can be canceled by the player.
- See Also
Notes
- This function is not protected nor limited in any way to hardware event restriction Blizzard used so far. This function can be called freely from an AddOn to auto-remove a given buff.
- This function replaced CancelPlayerBuff in 3.0.
- This function does not appear to work for canceling druid forms.