UnitRemoveBuffsEx
- Parameters
whichUnit unitThe unit to modify.
removePositive booleanShould be true if positive buffs should be included.
removeNegative booleanShould be true if negative buffs should be included.
magic booleanShould be true (or both magic and physical should be false) if buffs that are magical should included.
physical booleanShould be true (or both magic and physical should be false) if buffs that are physical should to be included.
timedLife booleanShould be true if timed life buffs should be included.
aura booleanShould be true if aura buffs should be included.
autoDispel booleanShould 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
removePositiveandremoveNegativeas true will include both positive and negative buffs (given that other criteria are satisfied). These two criteria are additive.- note
Specifying both
magicandphysicalas true will not include any buff. Specifyingmagicas true andphysicalas false will include only magical buffs (given that other criteria are satisfied), no physical buffs nor buffs that are neither magical nor physical. Specifyingmagicas false andphysicalas true will include only physical buffs (given that other criteria are satisfied), no magical buffs nor buffs that are neither magical nor physical. Specifying bothmagicandphysicalas false will include magical buffs, physical buffs, and buffs that are neither magical nor physical (given that other criteria are satisfied).- note
Specifying
timedLifeas true will include timed life buffs (given that other criteria are satisfied); non-timed life buffs will also be included. SpecifyingtimedLifeas false will exclude timed life buffs.- note
Specifying
auraas true will include aura buffs (given that other criteria are satisfied); non-aura buffs will also be included. Specifyingauraas false will exclude aura buffs.- note
Specifying
autoDispelas true will exclusively include dispelable (via dispelling abilities) buffs (given that other criteria are satisfied); non-dispelable buffs will not be excluded. SpecifyingautoDispelas 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 (suggest an edit or discuss on Github)
- 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