Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions modules/actionbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,13 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function ()
end

-- setup page switch frame
local prowling = nil
local pageswitch = CreateFrame("Frame", "pfActionBarPageSwitch", UIParent)
-- Check prowling only on buff change
pageswitch:RegisterEvent("PLAYER_AURAS_CHANGED")
pageswitch:SetScript("OnEvent", function()
prowling = IsCatStealth()
end)
pageswitch:SetScript("OnUpdate", function()
-- switch actionbar page depending on meta key that is pressed
if C.bars.pagemastershift == "1" and IsShiftKeyDown() then
Expand All @@ -974,10 +980,9 @@ pfUI:RegisterModule("actionbar", "vanilla:tbc", function ()

-- switch actionbar page if druid stealth is detected
if C.bars.druidstealth == "1" then
local stealth = IsCatStealth()
if stealth and _G.CURRENT_ACTIONBAR_PAGE == 1 then
if prowling and _G.CURRENT_ACTIONBAR_PAGE == 1 then
SwitchBar(prowl)
elseif not stealth and _G.CURRENT_ACTIONBAR_PAGE == 8 then
elseif not prowling and _G.CURRENT_ACTIONBAR_PAGE == 8 then
SwitchBar(default)
end
end
Expand Down