From 7d18d420889d7a13309ad0af920603b3e6972e30 Mon Sep 17 00:00:00 2001 From: KameleonUK <42344512+KameleonUK@users.noreply.github.com> Date: Mon, 22 Jun 2026 08:17:41 +0100 Subject: [PATCH] Fix Tooltip error in other addons Refactor hyperlink handling in GameTooltip to simplify link processing and ensure compatibility with other addons. --- Core/Tooltip.lua | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Core/Tooltip.lua b/Core/Tooltip.lua index add1d2c..027b7e2 100644 --- a/Core/Tooltip.lua +++ b/Core/Tooltip.lua @@ -483,15 +483,14 @@ function Tooltip:Initialize() local oldSetHyperlink = GameTooltip.SetHyperlink function GameTooltip:SetHyperlink(link) return WithDeferredMoney(self, function() + -- The native Blizzard SetHyperlink only accepts a bare "item:ID:e:e:e" string. + -- Any addon that captured the native before Guda loaded (e.g. AtlasLoot) will + -- call it directly with whatever we pass here, so we MUST strip the color codes + -- and |H...|h wrapper before forwarding. Passing the full colored link causes + -- "unknown link type" in those addons. local _, _, inner = string.find(link or "", "|H(.+)|h") - local forwarded = link - local itemLinkForCounts = link - if inner then - forwarded = inner - if strfind(inner, "^item:") then - itemLinkForCounts = inner - end - end + local forwarded = inner or link + local itemLinkForCounts = inner or link local ret = oldSetHyperlink(self, forwarded) if itemLinkForCounts and strfind(itemLinkForCounts, "item:") then Tooltip:AddInventoryInfo(self, itemLinkForCounts) @@ -653,4 +652,4 @@ function Tooltip:Initialize() end) addon:Print("Tooltip integration enabled - Inventory displays above vendor price") -end \ No newline at end of file +end