Skip to content

feat(bindings): backport direct-action and override binding APIs - #19

Open
peterkmg wants to merge 1 commit into
brues-code:masterfrom
peterkmg:master
Open

feat(bindings): backport direct-action and override binding APIs#19
peterkmg wants to merge 1 commit into
brues-code:masterfrom
peterkmg:master

Conversation

@peterkmg

Copy link
Copy Markdown

Backport the WoW 2.0 direct-action and temporary override binding APIs:

  • SetBindingSpell
  • SetBindingItem
  • SetBindingMacro
  • SetBindingClick
  • SetOverrideBinding
  • SetOverrideBindingSpell
  • SetOverrideBindingItem
  • SetOverrideBindingMacro
  • SetOverrideBindingClick
  • ClearOverrideBindings

Permanent helpers construct the standard SPELL, ITEM, MACRO, and CLICK command strings, then delegate to vanilla SetBinding. This preserves the current binding set, return value, UPDATE_BINDINGS notification, and SaveBindings behavior.

A resolved-command hook executes the four added command families while delegating existing Bindings.xml commands to the original client executor.

Override bindings are owner-scoped and session-only. Priority overrides take precedence over non-priority overrides, which take precedence over normal bindings. The most recently set override wins when priorities are equal.

Saved and raw macro execution is shared through Macro::Execute, allowing binding macros and attribute-based macrotext actions to use the same parser fallback.

  • Tested permanent and override spell, item, macro, and click bindings in game
  • Tested direct macro text through a click-bound macro-action button

Add SetBindingSpell/Item/Macro/Click plus the owner-scoped
SetOverrideBinding family. Store permanent commands through vanilla
SetBinding, execute SPELL/ITEM/MACRO/CLICK in the resolved-command hook,
and layer priority overrides ahead of the native binding table.

Factor raw and saved macro dispatch into Macro::Execute so click
attributes and binding commands share the same parser fallback. Preserve
key-down/key-up pairing when overrides change during an action.

Document return values, persistence, precedence, macro-text usage, and
the deliberate 1.12 differences in README and docs/API.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant