diff --git a/libs/libdebuff.lua b/libs/libdebuff.lua index 725d5f49..c481872e 100644 --- a/libs/libdebuff.lua +++ b/libs/libdebuff.lua @@ -211,13 +211,14 @@ end, true) function libdebuff:UnitDebuff(unit, id) scanner:SetUnitDebuff(unit, id) - local effect = ( scanner:Line(1) ) or "" + local effect = scanner:Line(1) or "" local unitname = UnitName(unit) local unitlevel = UnitLevel(unit) local texture, stacks, dtype = UnitDebuff(unit, id) - local duration, timeleft = nil, nil + local duration, timeleft = nil, .001 local rank = nil -- no backport + if libdebuff.objects[unitname] and libdebuff.objects[unitname][unitlevel] and libdebuff.objects[unitname][unitlevel][effect] then -- clean up cache if libdebuff.objects[unitname][unitlevel][effect].duration and libdebuff.objects[unitname][unitlevel][effect].duration + libdebuff.objects[unitname][unitlevel][effect].start < GetTime() then @@ -238,7 +239,7 @@ function libdebuff:UnitDebuff(unit, id) end end - return name, rank, texture, stacks, dtype, duration, timeleft + return effect, rank, texture, stacks, dtype, duration, timeleft end -- add libdebuff to pfUI API