From 82ec1fbcac8898022a39b36372cd44c0404cf788 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Tue, 29 Nov 2022 16:30:18 -0300 Subject: [PATCH] Fixed an issue with wrath --- classes/container_actors.lua | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/classes/container_actors.lua b/classes/container_actors.lua index ec128db9..5d5facd2 100644 --- a/classes/container_actors.lua +++ b/classes/container_actors.lua @@ -6,6 +6,8 @@ local _ local addonName, Details222 = ... + local bIsDragonflight = DetailsFramework.IsDragonflight() + local CONST_CLIENT_LANGUAGE = DF.ClientLanguage ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -475,22 +477,24 @@ return end - pet_tooltip_frame:SetOwner(WorldFrame, "ANCHOR_NONE") - pet_tooltip_frame:SetHyperlink ("unit:" .. (serial or "")) - local tooltipData = pet_tooltip_frame:GetTooltipData() + if (bIsDragonflight) then + pet_tooltip_frame:SetOwner(WorldFrame, "ANCHOR_NONE") + pet_tooltip_frame:SetHyperlink ("unit:" .. (serial or "")) + local tooltipData = pet_tooltip_frame:GetTooltipData() - if (tooltipData and tooltipData.lines[1]) then - if (tooltipData.lines[1].leftText == nome) then - for i = 2, #tooltipData.lines do - local tooltipLine = tooltipData.lines[i] - local args = tooltipLine.args - if (args) then - if (args[4] and args[4].field == "guid") then - local guidVal = args[4].guidVal - local guidCache = Details:GetParserPlayerCache() - if (guidCache[guidVal]) then - find_pet_found_owner(guidCache[guidVal], serial, nome, flag, self) - return + if (tooltipData and tooltipData.lines[1]) then + if (tooltipData.lines[1].leftText == nome) then + for i = 2, #tooltipData.lines do + local tooltipLine = tooltipData.lines[i] + local args = tooltipLine.args + if (args) then + if (args[4] and args[4].field == "guid") then + local guidVal = args[4].guidVal + local guidCache = Details:GetParserPlayerCache() + if (guidCache[guidVal]) then + find_pet_found_owner(guidCache[guidVal], serial, nome, flag, self) + return + end end end end