UnitRemoveBuffsEx

Parameters
whichUnit unit

The unit to modify.

removePositive boolean

Should be true if positive buffs should be included.

removeNegative boolean

Should be true if negative buffs should be included.

magic boolean

Should be true (or both magic and physical should be false) if buffs that are magical should included.

physical boolean

Should be true (or both magic and physical should be false) if buffs that are physical should to be included.

timedLife boolean

Should be true if timed life buffs should be included.

aura boolean

Should be true if aura buffs should be included.

autoDispel boolean

Should be true if exclusively buffs that are dispelable should be included.

comment

Removes all buffs matching criteria from a given unit.

note

Buffs are either positive or negative. Buffs are either magical or physical or neither. Buffs are either timed life (see UnitApplyTimedLife) or not. Buffs either stem from an aura or not. Buffs are either dispelable (via dispelling abilities) or not.

note

Specifying both removePositive and removeNegative as true will include both positive and negative buffs (given that other criteria are satisfied). These two criteria are additive.

note

Specifying both magic and physical as true will not include any buff. Specifying magic as true and physical as false will include only magical buffs (given that other criteria are satisfied), no physical buffs nor buffs that are neither magical nor physical. Specifying magic as false and physical as true will include only physical buffs (given that other criteria are satisfied), no magical buffs nor buffs that are neither magical nor physical. Specifying both magic and physical as false will include magical buffs, physical buffs, and buffs that are neither magical nor physical (given that other criteria are satisfied).

note

Specifying timedLife as true will include timed life buffs (given that other criteria are satisfied); non-timed life buffs will also be included. Specifying timedLife as false will exclude timed life buffs.

note

Specifying aura as true will include aura buffs (given that other criteria are satisfied); non-aura buffs will also be included. Specifying aura as false will exclude aura buffs.

note

Specifying autoDispel as true will exclusively include dispelable (via dispelling abilities) buffs (given that other criteria are satisfied); non-dispelable buffs will not be excluded. Specifying autoDispel as false will include both dispelable and non-dispelable buffs.

note

Mental model:

DELETE FROM whichUnit.buffs
WHERE
    (POSITIVE = removePositive OR NEGATIVE = removeNegative) AND
    ((magic = FALSE AND physical = FALSE) OR (MAGIC = magic AND physical = FALSE) OR (PHYSICAL = physical AND magic = FALSE)) AND
    (TIMED_LIFE = timedLife OR TIMED_LIFE = FALSE) AND
    (AURA = aura OR AURA = FALSE) AND
    (DISPELABLE = autoDispel OR DISPELABLE = TRUE)
bug

The criteria work differently than in UnitHasBuffsEx.

patch

1.07

Source
common.j
return type
nothing
Source code
native UnitRemoveBuffsEx            takes unit whichUnit, boolean removePositive, boolean removeNegative, boolean magic, boolean physical, boolean timedLife, boolean aura, boolean autoDispel returns nothing