mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-21 23:26:56 +00:00
Drop dead GUID-label branch in unit frame OnEnter
No unit frame ever has a GUID label -- CreateUnitFrame is only ever called with fixed type names (Player/Target/Focus/Party/Raid/...), and .label is only ever assigned those. The string.find(this.label, "^0x") branch was a leftover from an older focus implementation; focus now uses the real "focus" unit token, so OnEnter always resolves the mouseover via the normal unitstr path.
This commit is contained in:
+4
-13
@@ -1182,15 +1182,9 @@ end
|
||||
function pfUI.uf.OnEnter()
|
||||
if not this.label then return end
|
||||
|
||||
-- Nampower: 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
|
||||
local unitstr = this.label .. this.id
|
||||
if UnitExists(unitstr) then
|
||||
SetMouseoverUnit(unitstr)
|
||||
end
|
||||
|
||||
if this.config.showtooltip == "0" then return end
|
||||
@@ -1200,10 +1194,7 @@ function pfUI.uf.OnEnter()
|
||||
end
|
||||
|
||||
function pfUI.uf.OnLeave()
|
||||
-- Nampower: Clear native mouseover unit
|
||||
if SetMouseoverUnit then
|
||||
SetMouseoverUnit()
|
||||
end
|
||||
SetMouseoverUnit("")
|
||||
|
||||
GameTooltip:FadeOut()
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user