mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
c5ddc6c313
Hands ClassicAPI the action this addon resolved for each macro, so the icon, tooltip, cooldown sweep, range and usable state come from the client instead of from replaced action-bar globals. That also reaches the drag cursor and the macro window grid, which Lua cannot touch, and lets the client answer range for a macro slot directly rather than borrowing a proxy slot. - CleveRoids.useClassicAPIDisplay feature-detects C_Macro.SetMacroDisplay rather than checking CLASSIC_API_VERSION, which reports a dev sentinel while the API is unreleased. ClassicAPIMacroDisplay tells ClassicAPI we drive macro display, which it otherwise stands down from when it sees this addon. - macro.actions.macroID back-references the Blizzard index, since the update loop walks actions objects rather than macros. nil for SuperMacro macros, which have no index and so cannot be published. - PublishDisplay sends false, not nothing, when no action matched: that claims the macro and shows the question mark, where silence would hand it back to ClassicAPI's own #showtooltip parser. - PublishAllDisplays runs once the addon is ready and after every re-parse, since ClassicAPI re-evaluates nothing for us. It covers macros that aren't on a bar, which is what keeps the macro window grid correct. Deferred past load because SetMacroDisplay returns false until the player is in the world. - ReleaseDisplays hands every macro back on DisableAddon. The per-slot ACTIONBAR_SLOT_CHANGED fan-out is kept for the non-integrated path. Publishing repaints every slot holding the macro through the client's own notifier, so it is redundant when the API is present, but removing it outright would leave buttons never repainting on a ClassicAPI build without the API.