Commit a7047671 authored by Simpy's avatar Simpy 🐹

this looks a bit better

parent e8843034
......@@ -782,12 +782,7 @@ function AB:SpellButtonOnEnter(_, tt)
tt:SetOwner(self, 'ANCHOR_RIGHT')
local slot = _G.SpellBook_GetSpellBookSlot(self)
local needsUpdate = tt:SetSpellBookItem(slot, _G.SpellBookFrame.bookType) and tt == SpellBookTooltip
self.UpdateTooltip = (needsUpdate and AB.SpellButtonOnEnter) or nil
if needsUpdate then
tt:SetScript('OnUpdate', AB.SpellBookTooltipOnUpdate)
end
local needsUpdate = tt:SetSpellBookItem(slot, _G.SpellBookFrame.bookType)
local highlight = self.SpellHighlightTexture
if highlight and highlight:IsShown() then
......@@ -795,6 +790,14 @@ function AB:SpellButtonOnEnter(_, tt)
tt:AddLine(_G.SPELLBOOK_SPELL_NOT_ON_ACTION_BAR, color.r, color.g, color.b)
end
if tt == SpellBookTooltip then
self.UpdateTooltip = (needsUpdate and AB.SpellButtonOnEnter) or nil
if needsUpdate then
tt:SetScript('OnUpdate', AB.SpellBookTooltipOnUpdate)
end
end
tt:Show()
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment