12 lines
		
	
	
		
			513 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			513 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
-- somewhere in your addon's initialization
 | 
						|
local myTooltip = CreateFrame("GameTooltip", "MyAddOnTooltip", UIParent, "GameTooltipTemplate")
 | 
						|
myTooltip:SetOwner(UIParent, "ANCHOR_NONE")
 | 
						|
 | 
						|
-- later, when you want to look at a tooltip
 | 
						|
myTooltip:SetUnitBuff("player", index of buff)
 | 
						|
for i = 1, myTooltip:NumLines() do
 | 
						|
    local textLeft = _G["MyAddOnTooltipTextLeft"..i]:GetText()
 | 
						|
    local textRight = _G["MyAddOnTooltipTextRight"..i]:GetText()
 | 
						|
    -- do a :match or whatever to look for pertinent text
 | 
						|
end
 |