attempt to improve pet detection

This commit is contained in:
Tercio Jose
2022-11-28 17:54:11 -03:00
parent 4b3237f809
commit 5c3f964c84
2 changed files with 33 additions and 11 deletions
+20
View File
@@ -477,6 +477,26 @@
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
end
end
end
end
end
end
Details.tabela_vigente.raid_roster_indexed = Details.tabela_vigente.raid_roster_indexed or {}