From 7c2988d41356888137724592b84df69602016757 Mon Sep 17 00:00:00 2001 From: shagu Date: Fri, 21 Feb 2020 17:53:05 +0100 Subject: [PATCH] hunterbar: only switch while not already paged --- modules/hunterbar.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/hunterbar.lua b/modules/hunterbar.lua index 45add26d..1667f521 100644 --- a/modules/hunterbar.lua +++ b/modules/hunterbar.lua @@ -35,16 +35,14 @@ pfUI:RegisterModule("hunterbar", "vanilla", function () if not pfUI.hunterbar.melee or not pfUI.hunterbar.ranged then return end if IsActionInRange(pfUI.hunterbar.melee) == 1 and IsActionInRange(pfUI.hunterbar.ranged) == 0 then - if pfUI.hunterbar.current ~= 0 then - CURRENT_ACTIONBAR_PAGE = 9 + if _G.CURRENT_ACTIONBAR_PAGE == 1 then + _G.CURRENT_ACTIONBAR_PAGE = 9 ChangeActionBarPage() - pfUI.hunterbar.current = 0 end else - if pfUI.hunterbar.current ~= 1 then - CURRENT_ACTIONBAR_PAGE = 1 + if _G.CURRENT_ACTIONBAR_PAGE == 9 then + _G.CURRENT_ACTIONBAR_PAGE = 1 ChangeActionBarPage() - pfUI.hunterbar.current = 1 end end end)