mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
A macro written for another macro addon names conditions this parser does not have. SuperCleveRoidMacros' `[alive]` is one. The `#showtooltip` reader scans every macro body, so it met that condition and printed "SecureCmdOptionParse: unknown condition 'alive'" at login, about a macro that works. Worse than the noise: a condition we cannot evaluate cannot pass, so its group fails. A macro with no unconditional fallback clause then matched nothing, and the reader wrote 0 over the spellID the engine's own parse had put in the per-macro cache - costing that button its cooldown, range and usable state. `SecureCmdOptionParse` now records the keywords it does not own on its cached parse and returns the first one as a third value. It still names them, once each, for a caller the player drove. The reader passes the new `quiet` flag and reads that value instead: on a foreign dialect it resolves nothing, writes nothing, and stops re-evaluating until the body changes. The engine's parse stays in the cache, and the addon that owns those conditions can still claim the macro through `C_Macro.SetMacroDisplay`. Such an entry also stays out of `dirty`, because a dirty entry nothing evaluates would keep `HasPendingWork` true and re-run the catch-up on every reader. Moving the warn-once bookkeeping from parse time to call time also stops a quiet scan from consuming the one warning a keyword gets, so a condition the player later types is still named. This is not a load-order fault. SuperCleveRoidMacros creates `_G.CleveRoids` at the top of Init.lua, and that same file sets `ClassicAPIMacroDisplay`, which lifts our wholesale yield on purpose so it can publish per macro. The window is between our first tick and its first publish, which it cannot make until the player object exists.