From c6800685584a94edcd62d96869cc41d08b3f938c Mon Sep 17 00:00:00 2001 From: Simpy Date: Wed, 6 Nov 2024 20:24:01 -0500 Subject: [PATCH] fix tt using mod key to show spell id when ab module off --- ElvUI/Core/Modules/ActionBars/ActionBars.lua | 3 ++- ElvUI/Core/Modules/Tooltip/Tooltip.lua | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ElvUI/Core/Modules/ActionBars/ActionBars.lua b/ElvUI/Core/Modules/ActionBars/ActionBars.lua index bd240627a5..d46ced07a6 100644 --- a/ElvUI/Core/Modules/ActionBars/ActionBars.lua +++ b/ElvUI/Core/Modules/ActionBars/ActionBars.lua @@ -1017,6 +1017,8 @@ function AB:SpellButtonOnEnter(_, tt) local slotBank = self.spellBank or (_G.SpellBookFrame and _G.SpellBookFrame.bookType) if not (slotIndex and slotBank) then return end -- huh? + local needsUpdate = tt:SetSpellBookItem(slotIndex, slotBank) -- need this here when its GameTooltip + local highlight = self.SpellHighlightTexture if highlight and highlight:IsShown() then local color = _G.LIGHTBLUE_FONT_COLOR @@ -1024,7 +1026,6 @@ function AB:SpellButtonOnEnter(_, tt) end if tt == E.SpellBookTooltip then - local needsUpdate = tt:SetSpellBookItem(slotIndex, slotBank) tt:SetScript('OnUpdate', (needsUpdate and AB.SpellBookTooltipOnUpdate) or nil) end diff --git a/ElvUI/Core/Modules/Tooltip/Tooltip.lua b/ElvUI/Core/Modules/Tooltip/Tooltip.lua index 04429a7530..6468b6f9cd 100644 --- a/ElvUI/Core/Modules/Tooltip/Tooltip.lua +++ b/ElvUI/Core/Modules/Tooltip/Tooltip.lua @@ -840,12 +840,12 @@ function TT:MODIFIER_STATE_CHANGED() end else local parent = owner and owner:GetParent() - if E.Retail then - if parent and parent.slotIndex then + if parent then + if parent.slotIndex then AB.SpellButtonOnEnter(parent, nil, GameTooltip) + elseif parent == _G.SpellBookSpellIconsFrame then + AB.SpellButtonOnEnter(owner, nil, GameTooltip) end - elseif parent and parent == _G.SpellBookSpellIconsFrame then - AB.SpellButtonOnEnter(owner, nil, GameTooltip) end end end