Fandom

WoWWiki

API CancelPlayerBuff

104,637pages on
this wiki
Add New Page
Talk3 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

WoW API < CancelPlayerBuff

Removes a specific buff from the player.

CancelPlayerBuff(buffIndex);

ArgumentsEdit

buffIndex 
The index of the buff to remove. Can be obtained with GetPlayerBuff. Can also use buff name since the 2.3 patch.

ExampleEdit

CancelPlayerBuff(GetPlayerBuff(0,"HELPFUL"))
Result 
Removes the first (right-most in the default UI) buff from the player.

NotesEdit

  • 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.

(tested on live servers 2.0)

  • This function uses a zero-based index, while UnitBuff() does not.
  • The Burning Crusade: GetPlayerBuff() returns 0 if the buff doesn't exist. It stands to reason that this function would then be 1-based in TBC.

Also on Fandom

Random Wiki