Commit 18da2f5c authored by Simpy's avatar Simpy 🐹
Browse files

fix highlights not working, need to verify this doesn't taint

parent a23056ed
...@@ -27,6 +27,14 @@ local UnitHealth = UnitHealth ...@@ -27,6 +27,14 @@ local UnitHealth = UnitHealth
local UnitHealthMax = UnitHealthMax local UnitHealthMax = UnitHealthMax
local UnregisterStateDriver = UnregisterStateDriver local UnregisterStateDriver = UnregisterStateDriver
local VehicleExit = VehicleExit local VehicleExit = VehicleExit
local GetSpellBookItemInfo = GetSpellBookItemInfo
local ClearOnBarHighlightMarks = ClearOnBarHighlightMarks
local ClearPetActionHighlightMarks = ClearPetActionHighlightMarks
local UpdateOnBarHighlightMarksBySpell = UpdateOnBarHighlightMarksBySpell
local UpdateOnBarHighlightMarksByFlyout = UpdateOnBarHighlightMarksByFlyout
local UpdateOnBarHighlightMarksByPetAction = UpdateOnBarHighlightMarksByPetAction
local UpdatePetActionHighlightMarks = UpdatePetActionHighlightMarks
local SPELLS_PER_PAGE = SPELLS_PER_PAGE local SPELLS_PER_PAGE = SPELLS_PER_PAGE
local TOOLTIP_UPDATE_TIME = TOOLTIP_UPDATE_TIME local TOOLTIP_UPDATE_TIME = TOOLTIP_UPDATE_TIME
local NUM_ACTIONBAR_BUTTONS = NUM_ACTIONBAR_BUTTONS local NUM_ACTIONBAR_BUTTONS = NUM_ACTIONBAR_BUTTONS
...@@ -775,6 +783,19 @@ function AB:SpellButtonOnEnter(_, tt) ...@@ -775,6 +783,19 @@ function AB:SpellButtonOnEnter(_, tt)
local slot = _G.SpellBook_GetSpellBookSlot(self) local slot = _G.SpellBook_GetSpellBookSlot(self)
local needsUpdate = tt:SetSpellBookItem(slot, _G.SpellBookFrame.bookType) local needsUpdate = tt:SetSpellBookItem(slot, _G.SpellBookFrame.bookType)
ClearOnBarHighlightMarks()
ClearPetActionHighlightMarks()
local slotType, actionID = GetSpellBookItemInfo(slot, _G.SpellBookFrame.bookType)
if slotType == 'SPELL' then
UpdateOnBarHighlightMarksBySpell(actionID)
elseif slotType == 'FLYOUT' then
UpdateOnBarHighlightMarksByFlyout(actionID)
elseif slotType == 'PETACTION' then
UpdateOnBarHighlightMarksByPetAction(actionID)
UpdatePetActionHighlightMarks(actionID)
end
local highlight = self.SpellHighlightTexture local highlight = self.SpellHighlightTexture
if highlight and highlight:IsShown() then if highlight and highlight:IsShown() then
local color = _G.LIGHTBLUE_FONT_COLOR local color = _G.LIGHTBLUE_FONT_COLOR
...@@ -795,6 +816,9 @@ function AB:UpdateSpellBookTooltip(event) ...@@ -795,6 +816,9 @@ function AB:UpdateSpellBookTooltip(event)
end end
function AB:SpellButtonOnLeave() function AB:SpellButtonOnLeave()
ClearOnBarHighlightMarks()
ClearPetActionHighlightMarks()
SpellBookTooltip:Hide() SpellBookTooltip:Hide()
SpellBookTooltip:SetScript('OnUpdate', nil) SpellBookTooltip:SetScript('OnUpdate', nil)
end 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