libdebuff: emulate UnitDebuff API call

This commit is contained in:
shagu
2018-09-30 13:42:46 +02:00
parent 6a315f9e41
commit 2c66e5c0c2
3 changed files with 48 additions and 57 deletions
+2 -3
View File
@@ -665,9 +665,8 @@ pfUI:RegisterModule("nameplates", function ()
pfUI.nameplates.debuffs = {}
for i = 1, 16 do
if not UnitDebuff("target", i) then return end
local debuff = UnitDebuff("target", i)
local effect = (libdebuff and libdebuff:GetDebuffName("target", i)) or ""
pfUI.nameplates.debuffs[i] = { debuff, effect }
local name, _, texture = libdebuff:UnitDebuff("target", i)
pfUI.nameplates.debuffs[i] = { texture, name }
end
end
end)