275feba882
Macros were held by index and kept in creation order: - A sort or delete moved what a bar slot held. - `EditMacro` trimmed and capped differently and returned nothing. - `CastSpellByName` took the wrong quoted span. - A macro casting a pet spell never bound the pet's book. Reference: each scope sorts by the CRT `qsort` with `_strnicmp` (`0x73f727`, `0x4f0e10`). Slots hold the macro id, with bit 24 set for a character macro, and `DeleteMacro` clears every slot holding it (`0x4e5d10`). `EditMacro` returns the index after the re-sort. The quoted name ends at the next quote (`0x4efef0`). Names bind the player's book, then the pet's (`0x4b3bc0`). Changed: the table, the slots, the cursor and the saved files follow these, and tests pin each. Bar slots an earlier build saved for character macros are rewritten once to the new ids. Fixes #1502 Fixes #1505 Fixes #1187 Fixes #196 Fixes #197 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>