Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API CancelPlayerBuff
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{removedapi|3.0|Replaced by {{api|CancelUnitBuff}}("unit", buffIndex[, filter]) or ("unit", "spell"[, "rank"])}} {{wowapi}} Removes a specific buff from the player. CancelPlayerBuff(buffIndex); ==Arguments== ;buffIndex : The index of the buff to remove. Can be obtained with [[API GetPlayerBuff|GetPlayerBuff]]. Can also use buff name since the 2.3 patch. ==Example== CancelPlayerBuff(GetPlayerBuff(0,"HELPFUL")) ;Result : Removes the first (right-most in the default UI) buff from the player. ====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. (tested on live servers 2.0) * This function uses a zero-based index, while UnitBuff() does not. * '''The Burning Crusade:''' [[API GetPlayerBuff|GetPlayerBuff]]() returns 0 if the buff doesn't exist. It stands to reason that this function would then be 1-based in TBC.
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Ambox
(
edit
)
Template:Api
(
edit
)
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Removedapi
(
edit
)
Template:Tocright
(
edit
)
Template:WoW/removedapi
(
edit
)
Template:Wowapi
(
edit
)