From 2eb7506f3c370b52c955158c006b5941076970b9 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Thu, 21 May 2026 00:55:22 -0500 Subject: [PATCH] dont need to scan tooltip --- libs/libdebuff.lua | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/libs/libdebuff.lua b/libs/libdebuff.lua index 9b6cb569..a6219964 100644 --- a/libs/libdebuff.lua +++ b/libs/libdebuff.lua @@ -27,7 +27,6 @@ if GetLocale() == "ruRU" then end local libdebuff = CreateFrame("Frame", "pfdebuffsScanner", UIParent) -local scanner = libtipscan:GetScanner("libdebuff") local _, class = UnitClass("player") local lastspell @@ -829,12 +828,11 @@ function libdebuff:UnitDebuff(unit, displaySlot) local guid = GetUnitGUID(unit) if not guid then -- Safety fallback: no GUID available (should not happen with Nampower) - local bTexture, bStacks, bDtype = UnitDebuff(unit, displaySlot) - if bTexture then - scanner:SetUnitDebuff(unit, displaySlot) - effect = scanner:Line(1) or "" + local aura = C_UnitAuras.GetDebuffDataByIndex(unit, displaySlot) + if aura then + return aura.name, rank, aura.icon, aura.applications, aura.dispelName, duration, timeleft, caster end - return effect, rank, bTexture, bStacks, bDtype, duration, timeleft, caster + return effect, rank, texture, stacks, dtype, duration, timeleft, caster end -- Get current slot map from GetUnitField (cached 50ms) @@ -907,17 +905,16 @@ function libdebuff:UnitDebuff(unit, displaySlot) -- ============================================================================ -- FALLBACK: Legacy (non-Nampower) system -- ============================================================================ - - local bTexture, bStacks, bDtype = UnitDebuff(unit, displaySlot) - texture = bTexture - stacks = bStacks - dtype = bDtype - - if texture then - scanner:SetUnitDebuff(unit, displaySlot) - effect = scanner:Line(1) or "" + + local aura = C_UnitAuras.GetDebuffDataByIndex(unit, displaySlot) + if aura then + texture = aura.icon + stacks = aura.applications + dtype = aura.dispelName + effect = aura.name end - + + if effect and libdebuff.objects[unitname] then for level, effects in pairs(libdebuff.objects[unitname]) do if effects[effect] and effects[effect].duration then