• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] What's the use of UnitRemoveBuffsEx?

Status
Not open for further replies.
Level 11
Joined
Dec 3, 2011
Messages
366
JASS:
native UnitRemoveBuffsEx            takes unit whichUnit, boolean removePositive, boolean removeNegative, boolean magic, boolean physical, boolean timedLife, boolean aura, boolean autoDispel returns nothing

Anyone can explain to me, how this native work.

I don't understand how can wc3 detect magic or physical or anything else.
 
Level 13
Joined
Oct 18, 2013
Messages
690
Blizzard just wanted to warp your mind with subliminal messages.
Jk. It's probably one of those things that Blizz Dev Team never got around to implementing, just like SetHero*Stat*. One of the parameters is for permanance, but it's not like the stat change shows as, "+Green" like non-permanant stat boosts do.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
The timedLife boolean is to remove expiration timers.
I dont really know why the hell we want to use that but still.

The Positive/Negative booleans are pretty easy to understand.
When your target is happy, and positive is true, then it removes the buffs.
If your target is not happy and negative is true, it then removes the buffs.
In all other cases, it doesnt do shit.
(Or was it something else?)

The aura part is easy as well.
Auras are ussually not dispellable because you gain it when you are inside an aura... removing doesnt do shit as you re-gain it immediately... at least that is Blizzard logic.

The Physical and Magical part is something that is a bit too far into classifications.
For example, a buff like envenomed weapons is physical and a buff like inner fire is magical.
However, these are classifications of buffs which we all know that we can make a million more classifications if we want to.
Therefor it is pretty useless to use but they just implemented it.
Try make a test map with one unit being the target and one attacking it with envenomed spears (orc) and one buffing it with inner fire (human) and remove all buffs considered magical.
Poison stays, Inner Fire removed.
Try again removing physical buffs.
Inner Fire stays, Poison removed.

Also... "Remove all buffs considered Magical or Physical" vs "Remove all buffs considered Magical and Physical"... yea right.

EDIT:
But as I said, it is only classifications.
I for example would really much like a classification for Crowd Control.
Crowd Control is a classification of a buff that changes mobility (slow, stun, root, snare, knockback, taunt, etc)
I also want a level of a buff, for like removing all buffs lower than level 5.
Or I want a classification for stat changes (stat boost).
There are more than enough other classifications and shit to think about.
But the only two that exist in basic WC3 are Magical and Physical.

So for your actual question btdonald... dont try to make parameters for classifications in your buff system.
Try to make a way to add a condition function for it so map makers can make their own stuff.
At least that is what I assume that your question would have been.
 
Level 11
Joined
Dec 3, 2011
Messages
366
The timedLife boolean is to remove expiration timers.
I dont really know why the hell we want to use that but still.

The Positive/Negative booleans are pretty easy to understand.
When your target is happy, and positive is true, then it removes the buffs.
If your target is not happy and negative is true, it then removes the buffs.
In all other cases, it doesnt do shit.
(Or was it something else?)

The aura part is easy as well.
Auras are ussually not dispellable because you gain it when you are inside an aura... removing doesnt do shit as you re-gain it immediately... at least that is Blizzard logic.

The Physical and Magical part is something that is a bit too far into classifications.
For example, a buff like envenomed weapons is physical and a buff like inner fire is magical.
However, these are classifications of buffs which we all know that we can make a million more classifications if we want to.
Therefor it is pretty useless to use but they just implemented it.
Try make a test map with one unit being the target and one attacking it with envenomed spears (orc) and one buffing it with inner fire (human) and remove all buffs considered magical.
Poison stays, Inner Fire removed.
Try again removing physical buffs.
Inner Fire stays, Poison removed.

Also... "Remove all buffs considered Magical or Physical" vs "Remove all buffs considered Magical and Physical"... yea right.

EDIT:
But as I said, it is only classifications.
I for example would really much like a classification for Crowd Control.
Crowd Control is a classification of a buff that changes mobility (slow, stun, root, snare, knockback, taunt, etc)
I also want a level of a buff, for like removing all buffs lower than level 5.
Or I want a classification for stat changes (stat boost).
There are more than enough other classifications and shit to think about.
But the only two that exist in basic WC3 are Magical and Physical.

So for your actual question btdonald... dont try to make parameters for classifications in your buff system.
Try to make a way to add a condition function for it so map makers can make their own stuff.
At least that is what I assume that your question would have been.
I'm working with new buff system. I need to know about buff clearly.
 
Level 19
Joined
Dec 12, 2010
Messages
2,069
The timedLife boolean is to remove expiration timers.
I dont really know why the hell we want to use that but still.

I also want a level of a buff, for like removing all buffs lower than level 5.
Or I want a classification for stat changes (stat boost).

1. expiration timer removing may be handy in case if you want to prolong enchanted unit's life, sadly this function does nothing with it
2. buffs do not have level, at least it doesn't affect game whatsoever and probably being editor-only staff
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
A buff with a level is something that could be usefull for in-game classifications.
Like cure all poisons of level 1 to 5, for higher level poisons, you need a stronger antidote.

However, this is not implemented in WC3 directly for buffs.
But equal as physical or magical buffs, it is something to classify buffs and make a difference between two.
Which is also known as game-specific.
Which comes back at my statement that the physical and magical parameters of that function are not really that interesting as they may look.
 
Status
Not open for further replies.
Top