buff: hold shift to see unbuffed people

This commit is contained in:
shagu
2018-04-09 20:27:48 +02:00
parent f39d84a9b8
commit 8cf70d5d6a
3 changed files with 95 additions and 3 deletions
+17
View File
@@ -34,6 +34,23 @@ function pfUI.api.UnitInRange(unit)
end
end
-- [ UnitHasBuff ]
-- Returns whether a unit has the given buff or not.
-- unit [string] A unit to query (string, unitID)
-- buff [string] The texture of the buff.
-- return: [bool] true if unit has buff otherwise "nil"
function pfUI.api.UnitHasBuff(unit, buff)
local hasbuff = nil
for i=1,32 do
if UnitBuff(unit, i) == buff then
hasbuff = true
break
end
end
return hasbuff
end
-- [ strvertical ]
-- Creates vertical text using linebreaks. Multibyte char friendly.
-- 'str' [string] String to columnize.