Getting all button spells/states
Hello
It is about TDDps addon. I'm author of it. I have a problem with multi state bars (for example when rogue gets in stealth, action bar changes to other one). How can I actually read all spells that are beneath all of the buttons? In multiple states? Here is the example code of scaning ElvUI (LibActionButton): Lua Code:
Is there a way to make it work? Scanning them each time bar changes does not seem like a good idea |
i think you are sorted as is, just be going thru 120 action slots.
Those extra bars are just slots above 72 - http://wowwiki.wikia.com/wiki/ActionSlot |
Nope it does not work as it is now.
I mean maybe they are being read but the actual button does not change it only changes it state. I can't imagine optimal solution when action bar changes. Typically it would be this event: ACTIONBAR_PAGE_CHANGED Basically I want a solution where I can highlight a spell by spell name Right now i am keeping a reference to a button in table: Lua Code:
|
If rogue uses stealth and first action bar changes, first button there is slot 73, not 1. Maybe there is problem with visual part of your code. Are you using something like button:GetID() to identify buttons/slots?
If you need events, there is a list in ActionBarController.lua - it maybe would be good idea to look there and inside ActionButton.lua too. Here is exactly what you need, i think - http://wowwiki.wikia.com/wiki/API_GetBonusBarOffset |
I have some sort of idea.
Instead of keeping table with spell name -> buttons I could simply calculate the action slot on the fly by this: Lua Code:
If im not mistaken this should work on original blizzard ui, elvui, supervillian and bartender, buttonforge is completely off this grid so it would need to stay as it is. Actually, I would just need to first 12 actions, not the rest of them since they are not changing. Am I correct? |
You need condition if GetBonusBarOffset() > 0 for that code to work i think
I not fallow bar and btn variables. Imho bar would be 1 - default, and no idea how to get it, if different. And btn is just new slotID, isnt it? I use Bartender and you can highly configure all action bar/pages by various states/conditions. Not many ppl probably doing that, but if someone does, only way to track would be dig in Bartender code i guess. |
I've got another idea, maybe just not keep cache of first 12 buttons and check them every time something changes? It won't be so time consuming operation with just 12 buttons.
|
All times are GMT -6. The time now is 06:55 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI