libdebuff: fix typo in return and fake timeleft

This commit is contained in:
shagu
2018-10-09 20:17:05 +02:00
parent 3137cc9402
commit cd31341ff2
+4 -3
View File
@@ -211,13 +211,14 @@ end, true)
function libdebuff:UnitDebuff(unit, id) function libdebuff:UnitDebuff(unit, id)
scanner:SetUnitDebuff(unit, id) scanner:SetUnitDebuff(unit, id)
local effect = ( scanner:Line(1) ) or "" local effect = scanner:Line(1) or ""
local unitname = UnitName(unit) local unitname = UnitName(unit)
local unitlevel = UnitLevel(unit) local unitlevel = UnitLevel(unit)
local texture, stacks, dtype = UnitDebuff(unit, id) local texture, stacks, dtype = UnitDebuff(unit, id)
local duration, timeleft = nil, nil local duration, timeleft = nil, .001
local rank = nil -- no backport local rank = nil -- no backport
if libdebuff.objects[unitname] and libdebuff.objects[unitname][unitlevel] and libdebuff.objects[unitname][unitlevel][effect] then if libdebuff.objects[unitname] and libdebuff.objects[unitname][unitlevel] and libdebuff.objects[unitname][unitlevel][effect] then
-- clean up cache -- 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 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
end end
return name, rank, texture, stacks, dtype, duration, timeleft return effect, rank, texture, stacks, dtype, duration, timeleft
end end
-- add libdebuff to pfUI API -- add libdebuff to pfUI API