API CancelUnitBuff

From Wowpedia
Jump to: navigation, search

Removes a specific buff from the unit.

CancelUnitBuff("unit", buffIndex or "spell" [,"filter" or "rank"]);

Arguments

unit 
String (unitId) - Unit to cancel the buff from, must be under the player's control.
spell 
String - Name of the buff to cancel.
rank 
Optional String - Spell rank.

OR

buffIndex 
Number - index of the buff to cancel, ascending from 1.
filter 
String - any of combination of "HELPFUL|HARMFUL|PLAYER|RAID|CANCELABLE|NOT_CANCELABLE".

Notes

  • This function does not work for canceling druid forms, rogue Stealth, death knight presences, or priest Shadowform.

Patch history

Cataclysm Patch 4.0.1 (2010-10-12): Protected while in combat; tainted code cannot cancel stance-affecting buffs even while out of combat.
Wrath of the Lich King Patch 3.0.2 (2008-10-14): Replaced CancelPlayerBuff.

See also