When you find a better way let me know
I try to have my own damagemeter and tracking the owner is difficult ... I use this monster ... (stolen from different sources)
Lua Code:
local addonName, addon = ...
local scanTipName = format("%s_ScanTooltip", addonName)
local scanTipText = format("%sTextLeft2", scanTipName)
local scanTip = CreateFrame("GameTooltip", scanTipName, WorldFrame, "GameTooltipTemplate")
local scanTipTitles = {}
for i = 1, 48 do
scanTipTitles[#scanTipTitles + 1] = _G[format("UNITNAME_SUMMON_TITLE%i",i)]
end
local function scanTooltip(guid)
local text = _G[scanTipText]
if(guid and text) then
scanTip:SetOwner( WorldFrame, "ANCHOR_NONE" )
scanTip:SetHyperlink(format('unit:%s',guid))
local text2 = text:GetText()
if(text2) then
for i = 1, #scanTipTitles do
local check = scanTipTitles[i]:gsub("%%s", "(.+)"):gsub("[%[%]]", "%%%1")
local a,b,c = string.find(text2, check)
if(c) then
local g = UnitGUID(c)
if(g) then
return g
end
end
end
end
end
end