fix(actionbars): make manual paging work while skyriding - #1234
Open
dfrisone wants to merge 1 commit into
Open
Conversation
Two independent reasons paging did nothing while dragonriding. 1. The MainBar paging state driver emitted [bonusbar:5] 11 ahead of the [bar:N] clauses, so the first match pinned the bar to the skyriding page and swallowed every manual page change until dismounting. Blizzard only consults the bonus bar while the action bar page is 1 (ActionBarController_UpdateAll), and MainBar keybinds are native ACTIONBUTTONn commands that resolve the same way, so on page 2 while skyriding the button showed a skyriding ability but the keypress fired the page 2 slot. Moved the clause after [bar:N] in both the hardcoded fallback and the custom-paging builder. Form paging keeps its existing precedence in the custom-paging builder. 2. ActionBar_PageUp/PageDown read the MainBar's state-page attribute as if it were Blizzard's manual page, but state-page is the RESOLVED page: 7-10 in a form, 11 while skyriding, 12/14 in a vehicle or override bar. Cycling off that value walked out of the 1-6 range, so while skyriding Next Action Bar Page always requested page 1 (11 + 1 > 6 wraps), which from manual page 1 is a no-op that left the key looking dead, and Previous Action Bar Page called ChangeActionBarPage(10). The same wrap made Next Page a dead key in cat form. Trust state-page only inside the manual range and fall back to GetActionBarPage(), which is what ChangeActionBarPage writes and what the page-number text and the paging arrows' [bar:N] macro already read. Also fixes the same bonusbar-beats-page inversion in the CDM keybind cache fallback used when the Action Bars module is disabled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Reported by @Anmity (Discord, v8.7.4): while dragonriding, paging Action Bar 1 to page 2/3 changes the page number but the bar keeps showing the skyriding abilities, so pages 2/3 are unusable until dismounting. Static flying mounts are unaffected.
Cause
Two independent defects, both hit while skyriding:
The MainBar paging state driver emitted
[bonusbar:5] 11ahead of the[bar:N]clauses. First match wins, so mounting pinned the bar to the skyriding page and every manual page change was swallowed. Blizzard only consults the bonus bar while the action bar page is 1 (ActionBarController_UpdateAll), and MainBar keybinds are nativeACTIONBUTTONncommands that resolve the same way, so on page 2 while skyriding the button showed a skyriding ability but the keypress fired the page 2 slot.ActionBar_PageUp/PageDown(our replacements, backing the Next/Previous Action Bar Page keybinds) cycled off the bar'sstate-pageattribute as if it were the manual page. Butstate-pageis the resolved page: 11 while skyriding, 7-10 in a form, 12/14 in a vehicle. Cycling off 11 walked out of the 1-6 range, so Next Page always requested page 1 (a no-op from manual page 1, leaving the key looking dead) and Previous Page calledChangeActionBarPage(10). This is why the reporter saw the page number move (the on-screen arrows use a[bar:N]macro, which reads the manual page by construction) while the bound keys did nothing.Fix
[bonusbar:5] 11after the[bar:N]loop in both the hardcoded fallback (GetClassPagingConditions) and the custom-paging builder (BuildPagingConditions), matching the engine's resolution order. Form paging keeps its existing precedence in the custom-paging builder, so configured form pages (e.g. Cat Form -> Bar 7) behave exactly as before.ActionBar_PageUp/PageDownnow truststate-pageonly inside the manual 1-6 range and otherwise fall back toGetActionBarPage(), which is whatChangeActionBarPagewrites. Also fixes Next Page doing nothing in cat form.Behaviour note
Parking on page 2 and then mounting no longer swaps to the skyriding bar, because a manual page now beats the skyriding swap. This matches the default UI exactly, and "Disable Skyriding Paging" already exists for anyone who wants to stay off the skyriding bar entirely.
Testing
Tested in-game: page keys and paging arrows both work while skyriding (bar shows and fires pages 2/3), page 1 while skyriding still shows the skyriding bar, dismounting on page 2 stays on page 2, and Druid form paging is unchanged with and without custom paging configured.
No new options, saved variables, events, or OnUpdate; changes are reordered state driver strings and insecure-Lua page math only.