Closed ferronn-dev closed 3 years ago
For classic/tbc, this is a pet. https://github.com/Gethe/wow-ui-source/blob/classic/FrameXML/PetActionBarFrame.lua
pet buttons call https://wowpedia.fandom.com/wiki/API_CastPetAction, which is equivalent to type="pet" action=nnn in secure buttons
https://wowpedia.fandom.com/wiki/API_GetPetActionInfo is out of date, consult the source
The set of pet actions can change during combat (MCing different mobs, for instance). The whole setup here needs to be robust to that, which means that the current use of attr= won't work since changes there are deferred to after combat. We need to teach the header about pets. Ugh.
This sounds very much like yet another reason to give every action their own button.
GetActionInfo is available in the restricted environment. Maybe GetPetActionInfo is as well?
According to https://github.com/Gethe/wow-ui-source/blob/classic/FrameXML/RestrictedEnvironment.lua, it appears not.
Perhaps we should remove action button show/hide completely and use alpha to "hide" insecurely.
This requires action bar manipulation.