![Mega Macro](https://media.forgecdn.net/avatars/thumbnails/302/526/256/256/637368011192192315.png)
Addons that create macros
FaileDestiny opened this issue · 2 comments
Addons that create macros such as AutoPotion, & RandomHearth create infinite macros
I have the same problem with Rested-XP. All available slots are being spammed with the generated macro from Rested-XP.
Addons like AutoPotion interact with the game's default macro API by using global functions such as CreateMacro
and EditMacro
. These functions rely on macro names for identification.
MegaMacro, however, manages macros through its own system, using random IDs in place of the traditional names. As a result, when an addon like AutoPotion attempts to modify a macro named "AutoPotion," it can't locate it. This causes the addon to continually create new macros, leading to an infinite number being generated.
Ideally, MegaMacro should be redesigned to allow other addons to interface with the game's native macro system without issues. At the very least, it should provide public hooks that enable third-party addon developers to perform basic CRUD (create, read, update, delete) operations on macros by name. Since MegaMacro stores the macro names as DisplayName in its internal table, this should be achievable.
I personally use AutoPotion, and as such, I've submit a pull request to AutoPotion which adds compatibility support for MegaMacro. I won't do the same for the other addons you've mentioned, because I don't use them. That said, you're welcome to contact those addon developers, and have them reference my PR, to give them an idea of how they can add MegaMacro compatibility to their own addons.