StarTip = {} |
|
local origs = {} |
|
local function OnTooltipSetUnit(frame, ...) |
local name, unitID = frame:GetUnit() |
|
if unitID then |
local index = GetRaidTargetIndex(unitID) |
if index then |
frame:AddDoubleLine(" ", "Raid Target") |
frame:AddTexture("Interface\\TARGETINGFRAME\\UI-RaidTargetingIcon_"..index..".blp") |
end |
end |
if origs[frame] then |
return origs[frame](frame, ...) |
end |
end |
|
for _,frame in pairs{GameTooltip} do |
origs[frame] = frame:GetScript("OnTooltipSetUnit") |
frame:SetScript("OnTooltipSetUnit", OnTooltipSetUnit) |
end |