From 22b6f37d56fd4f8f07aa9b6d4e9c151e61dbc9db Mon Sep 17 00:00:00 2001 From: Meow <30401521+me0wg4ming@users.noreply.github.com> Date: Mon, 16 Feb 2026 23:35:47 +0100 Subject: [PATCH] adding SetMouseoverUnit for Unitframes. adding SetMouseoverUnit for Unitframes. --- api/unitframes.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/api/unitframes.lua b/api/unitframes.lua index 2a98286a..ed9c8f13 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -1702,6 +1702,18 @@ end function pfUI.uf.OnEnter() if not this.label then return end + + -- Nampower/SuperWoW: Set native mouseover unit for macro/addon compatibility + if SetMouseoverUnit then + local unitstr = this.label .. this.id + -- For GUID-based frames (focus), use the GUID directly + if this.label and string.find(this.label, "^0x") then + SetMouseoverUnit(this.label) + elseif UnitExists(unitstr) then + SetMouseoverUnit(unitstr) + end + end + if this.config.showtooltip == "0" then return end GameTooltip_SetDefaultAnchor(GameTooltip, this) GameTooltip:SetUnit(this.label .. this.id) @@ -1709,6 +1721,11 @@ function pfUI.uf.OnEnter() end function pfUI.uf.OnLeave() + -- Nampower/SuperWoW: Clear native mouseover unit + if SetMouseoverUnit then + SetMouseoverUnit() + end + GameTooltip:FadeOut() end