Update
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
-- 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
|
||||
-- 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
|
||||
|
Reference in New Issue
Block a user