Cancels a buff on the player. CancelUnitBuff becomes a protected function while under combat lockdown.


See also Buff functions.

Signature:

CancelUnitBuff("unit", index [, "filter"]) or CancelUnitBuff("unit", "name" [, "rank" [, "filter"]])

Arguments:

  • unit - A unit to query (only valid for 'player') (string, unitID)
  • index - Index of an aura to query (number)
  • name - Name of an aura to query (string)
  • rank - Secondary text of an aura to query (often a rank; e.g. "Rank 7") (string)
  • filter - A list of filters to use separated by the pipe '|' character; e.g. "RAID|PLAYER" will query group buffs cast by the player (string)
    • CANCELABLE - Query auras that can be cancelled
    • HARMFUL - Query debuffs only
    • HELPFUL - Query buffs only
    • NOT_CANCELABLE - Query auras that cannot be cancelled
    • PLAYER - Query auras the player has cast
    • RAID - Query auras the player can cast on party/raid members (as opposed to self buffs)
This function requires a key or mouse press in order to be used, but may not be protected.
This function cannot be called during combat