View Single Post
05-25-18, 04:38 PM   #1
galvin
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 265
BfA - Bug with ScanTooltip:SetHyperlink?

I have code that checks the spell book on aura changed or spell book changed events.
I use ScanTooltip:SetHyperlink(format('spell:%s', SpellID))
This works the first time, but later ScanTooltip:NumLines() returns 0.
This works on live with no issues. So either a bug or something was changed?

The code that makes ScanTooltip
Code:
local function CreateScanTooltip()
  if ScanTooltip == nil then
    ScanTooltip = CreateFrame('GameTooltip')

    ScanTooltip:SetOwner(UIParent, 'ANCHOR_NONE')
    for Index = 1, 8 do
       local Left = ScanTooltip:CreateFontString()
       local Right = ScanTooltip:CreateFontString()
       ScanTooltip['L' .. Index] = Left
       ScanTooltip['R' .. Index] = Right

       ScanTooltip:AddFontStrings(Left, Right)
    end
  end
end
  Reply With Quote