Skip to content

Commit

Permalink
fix tt using mod key to show spell id when ab module off
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Nov 7, 2024
1 parent 71c92f8 commit c680068
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion ElvUI/Core/Modules/ActionBars/ActionBars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1017,14 +1017,15 @@ 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
tt:AddLine(_G.SPELLBOOK_SPELL_NOT_ON_ACTION_BAR, color.r, color.g, color.b)
end

if tt == E.SpellBookTooltip then
local needsUpdate = tt:SetSpellBookItem(slotIndex, slotBank)
tt:SetScript('OnUpdate', (needsUpdate and AB.SpellBookTooltipOnUpdate) or nil)
end

Expand Down
8 changes: 4 additions & 4 deletions ElvUI/Core/Modules/Tooltip/Tooltip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c680068

Please sign in to comment.