Add new code snippets

This commit is contained in:
2024-03-03 13:50:12 +01:00
commit 01b612a50b
409 changed files with 65292 additions and 0 deletions

View File

@@ -0,0 +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