From 4cb67fa0537d8059bf1d111c74d9eee115b30497 Mon Sep 17 00:00:00 2001 From: Meow <30401521+me0wg4ming@users.noreply.github.com> Date: Tue, 24 Feb 2026 18:54:28 +0100 Subject: [PATCH] fix to show hots with same icon as Regrowth to not show up as tracked healing spell fix to show hots with same icon as Regrowth to not show up as tracked healing spell --- api/unitframes.lua | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/api/unitframes.lua b/api/unitframes.lua index 18f29bcd..63306525 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -2378,9 +2378,9 @@ function pfUI.uf:RefreshUnit(unit, component) if table.getn(unit.indicators) > 0 then for i=1,32 do local texture, count = UnitBuff(unitstr, i) - local timeleft, _ + local timeleft, buffName, _ if pfUI.client > 11200 then - _, _, texture, _, _, timeleft = _G.UnitBuff(unitstr, i) + buffName, _, texture, _, _, timeleft = _G.UnitBuff(unitstr, i) end if texture then @@ -2388,6 +2388,13 @@ function pfUI.uf:RefreshUnit(unit, component) for _, filter in pairs(unit.indicators) do if filter == string.lower(texture) then if string.lower(texture) == "interface\\icons\\spell_nature_rejuvenation" then + -- Also verify spell name to avoid false matches from spells sharing this icon + if not buffName then + scanner = scanner or libtipscan:GetScanner("unitframes") + scanner:SetUnitBuff(unitstr, i) + buffName = scanner:Line(1) or "" + end + if string.lower(buffName) ~= "rejuvenation" then break end local start, duration, prediction = libpredict:GetHotDuration(unitstr, "Reju") pfUI.uf:AddIcon(unit, pos, texture, timeleft or prediction, count, tonumber(start), tonumber(duration)) pos = pos + 1 @@ -2398,6 +2405,13 @@ function pfUI.uf:RefreshUnit(unit, component) pos = pos + 1 break elseif string.lower(texture) == "interface\\icons\\spell_nature_resistnature" then + -- Also verify spell name to avoid false matches from spells sharing this icon + if not buffName then + scanner = scanner or libtipscan:GetScanner("unitframes") + scanner:SetUnitBuff(unitstr, i) + buffName = scanner:Line(1) or "" + end + if string.lower(buffName) ~= "regrowth" then break end local start, duration, prediction = libpredict:GetHotDuration(unitstr, "Regr") pfUI.uf:AddIcon(unit, pos, texture, timeleft or prediction, count, tonumber(start), tonumber(duration)) pos = pos + 1