| |
I turned on all four extra bars. Then, I cycled through my main action bar using the key bindings for ActionBar_PageUp and ActionBar_PageDown. Going in one direction, I saw bar 1, bar 6, bar 2, bar 1, bar 6, bar 2, bar 1, bar 6, bar 2, etc. Going in the other direction, I saw bar 1, bar 2, bar 1, bar 2, bar 1, bar 2, etc.
Notice that bar 6 should have been omitted in both directions. The offending code is here:
function ActionBar_PageUp()
CURRENT_ACTIONBAR_PAGE = CURRENT_ACTIONBAR_PAGE + 1;
local nextPage;
for i=CURRENT_ACTIONBAR_PAGE, NUM_ACTIONBAR_PAGES do
if ( VIEWABLE_ACTION_BAR_PAGES[i] ) then
nextPage = i;
break;
end
end
if ( not nextPage ) then
CURRENT_ACTIONBAR_PAGE = 1;
else
CURRENT_ACTIONBAR_PAGE = nextPage;
end
ChangeActionBarPage();
end
function ActionBar_PageDown()
CURRENT_ACTIONBAR_PAGE = CURRENT_ACTIONBAR_PAGE - 1;
local prevPage;
for i=CURRENT_ACTIONBAR_PAGE, 1, -1 do
if ( VIEWABLE_ACTION_BAR_PAGES[i] ) then
prevPage = i;
break;
end
end
if ( not prevPage ) then
CURRENT_ACTIONBAR_PAGE = NUM_ACTIONBAR_PAGES;
else
CURRENT_ACTIONBAR_PAGE = prevPage;
end
ChangeActionBarPage();
end
It should read something along the lines of (untested):
function ActionBar_PageUp()
CURRENT_ACTIONBAR_PAGE = CURRENT_ACTIONBAR_PAGE + 1;
local nextPage;
for i=CURRENT_ACTIONBAR_PAGE, NUM_ACTIONBAR_PAGES do
if ( VIEWABLE_ACTION_BAR_PAGES[i] ) then
nextPage = i;
break;
end
end
if ( not nextPage ) then
for i=1, (CURRENT_ACTIONBAR_PAGE - 1) do
if ( VIEWABLE_ACTION_BAR_PAGES[i] ) then
nextPage = i;
break;
end
end
end
if ( nextPage ) then
CURRENT_ACTIONBAR_PAGE = nextPage;
end
ChangeActionBarPage();
end
function ActionBar_PageDown()
CURRENT_ACTIONBAR_PAGE = CURRENT_ACTIONBAR_PAGE - 1;
local prevPage;
for i=CURRENT_ACTIONBAR_PAGE, 1, -1 do
if ( VIEWABLE_ACTION_BAR_PAGES[i] ) then
prevPage = i;
break;
end
end
if ( not prevPage ) then
for i=NUM_ACTIONBAR_PAGES, (CURRENT_ACTIONBAR_PAGE + 1), -1 do
if ( VIEWABLE_ACTION_BAR_PAGES[i] ) then
prevPage = i;
break;
end
end
end
if ( prevPage ) then
CURRENT_ACTIONBAR_PAGE = prevPage;
end
ChangeActionBarPage();
end
|