Level of Buff on Unit

Status
Not open for further replies.
Level 17
Joined
Feb 11, 2011
Messages
1,860
Hi guys,

I have encountered something strange. My unit is affected by a custom Devotion Aura spell which is on level 3. I use GetUnitAbilityLevel(myUnit, 'B000') (B000 is the ID of the custom buff) and it returns 1 instead of 3. Is this meant to happen or am I doing something wrong?

Thanks,

Mr_Bean
 
does it also returns 1 if you search the source of the buff (here the unit with the devotion aura) and try to get the level there? i ask that because (im not sure) buffs always are level 1 and just the ability is level X if im right.
 
more work? Oo

you just have to loop through the units in range of the aura from the unit with the buff and check whether the unit has the ability...that not really more work Oo
 
the prolem is that if the buff is from an aura and the aura isnt an ability of that unit the level is 1 all the time ;D you have to find the source of it xD
 
You can't get the level of a buff using GetUnitAbilityLevel. All you can do is check whether it has the ability or not. That's all. I know it's quite sucky, but you have to live with it.

You have to manually keep track of buff levels - that's what I'm doing too (you shall see it once I post my first hero contest wip)
 
LOL I just tested it.
No matter which unit you're getting from (either Caster or AffectedUnit), the value still returns as '1'.

Therefore I think when the buff applies, you're gonna need a method to store value (level of ability) to the unit and loads it back when you want to use it.

Yeah, lots of work.
 
Status
Not open for further replies.
Back
Top