| 07-12-2009, 07:42 AM | #1 |
JASS:native UnitHasBuffsEx takes unit whichUnit, boolean removePositive, boolean removeNegative, boolean magic, boolean physical, boolean timedLife, boolean aura, boolean autoDispel returns boolean Alright, does anyone know if this native does what i suppose it does (returning true if the specified unit has a buff matching certain criteria)? My tests so far have shown nothing (it always returns false). |
| 07-12-2009, 09:33 AM | #2 |
this is gui function as i know, read comment... and better tell us what you want to do, not how you want to do it. |
| 07-12-2009, 10:09 AM | #3 |
UnitHasBuffsEx is not integrated into GUI as far as i can see. However, UnitCountBuffsEx is. If theres any consistency in Blizzards natives, UnitHasBuffsEx doesnt work (using the same parameters on it as if i was counting buffs using UnitCountBuffsEx). What i want to do: Detect if a unit is under the effect of ANY debuff (excluding expiration timers). |
| 07-12-2009, 11:09 AM | #4 |
you can count debufs, play with UnitCountBuffsEx non zero return mean there is debuff (for units with summoned classification deduct 1 from result, there is only one exp timer per unit possible) |
| 07-12-2009, 02:25 PM | #5 |
bad news, UnitCountBuffsEx doesnt work as well. Can anyone confirm this, or is it just me being dumb? |
| 07-12-2009, 02:55 PM | #6 |
there is advent of zenith map, it is not open source but, anyway check its code, since it contain some spells with damage per buff effects. |
| 07-12-2009, 03:29 PM | #7 |
I manually control all buffs in the map, so I can detect if units suffer them at will through the system. I do not use any native or something special. |
| 07-12-2009, 04:57 PM | #8 |
UnitRemoveBuffsBJ UnitCountBuffsExBJ is bj functions with nice comment over params tested - working damn check gui first time is mana |
| 07-12-2009, 06:09 PM | #9 |
DioD, im fully aware of that GUI function. However, when i was testing the native with the debuff from 'Aslo' (Slow, human unit ability), it always returned "0", regardless of whether the buff was on the unit or not. I also set every boolean parameter of the function to true, but that didnt help as well. I concluded the native must be broken. If you managed to get it working, please provide a test map, so i can figure out what im doing wrong. |
| 07-13-2009, 10:40 AM | #10 |
There is test&debug map you are free to use any precious stuff from it. ofc i can rip buff test, but have not time for this. engine\trigger18 do its job |
| 07-14-2009, 06:15 AM | #11 |
alright, thanks for not giving up on me. I tracked the error down and eliminated it. You might want to remove the map. |
