Trying to understand GameTooltip but for some reason not working as intended (reading tooltips)
Code:
function vQC_ToolTips(self)
local lines = self:NumLines()
print(lines)
for i = 1, lines do
local txtL = getglobal(self:GetName() .. "TextLeft" .. i)
if txtL:GetText() ~= nil then
if txtL:GetText() == "Quest ID" then
local txtR = getglobal(self:GetName() .. "TextRight" .. i)
print("Found it "..txtR:GetText())
end
end
end
end
GameTooltip:HookScript("OnShow", vQC_ToolTips)
Some would give me information, other will not.
This will NOT give me QuestID into chat, also x.Numlines shows 3 when it's 11
http://prntscr.com/vqv2ya
But this one will, while this x.NumLines shows 12 properly
https://prnt.sc/vqv3fx
So what am i missing? Im trying to extract all information from whomever's addon's tooltip created