[Help] API UnitDebuff arguments
Posted: Fri Nov 13, 2015 12:11 pm
Hey,
does anyone have information on whether the "removable" argument of "UnitDebuff" is working correctly?
If I understood the API correctly the argument is added like this:
or to make it clearer
where the last "1" is the removable argument and 1,16 is the debuff slot range (yes, I know it should be 1,8 atm but that shouldn't matter)
However it seems to always return all debuff types, not only magic / poison but also generally unremovable debuff types like "Deserter" or "Resurrection Sickness"
macros I tested this with:
printing debuff icon information:
targeting players with debuffs
just added a second condition if no nearby friend has any debuff to avoid the client from crashing
is it bugged or am I just missing something?
ps: according to this http://vanilla-wow.wikia.com/wiki/API_UnitDebuff and no errors being returned the removable argument should be implemented
does anyone have information on whether the "removable" argument of "UnitDebuff" is working correctly?
If I understood the API correctly the argument is added like this:
- Code: Select all
UnitDebuff("unit", 1,16,1)
or to make it clearer
- Code: Select all
i=1,16,1 UnitDebuff("unit", i)
where the last "1" is the removable argument and 1,16 is the debuff slot range (yes, I know it should be 1,8 atm but that shouldn't matter)
However it seems to always return all debuff types, not only magic / poison but also generally unremovable debuff types like "Deserter" or "Resurrection Sickness"
macros I tested this with:
printing debuff icon information:
- Code: Select all
/run for i=1,16,1 do local D= UnitDebuff("target",i); if D then ChatFrame1:AddMessage(D) end end
targeting players with debuffs
- Code: Select all
/run local i=1,16,1 repeat TargetNearestFriend() until UnitDebuff("target", i) or UnitIsUnit("target", "player")==1
just added a second condition if no nearby friend has any debuff to avoid the client from crashing
is it bugged or am I just missing something?
ps: according to this http://vanilla-wow.wikia.com/wiki/API_UnitDebuff and no errors being returned the removable argument should be implemented