View Single Post
04-25-16, 09:08 PM   #5
Sharji
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 14
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:
  1. local slotID = rememberedActionSlot[spellName];
  2.     local bonusOffset = ((NUM_ACTIONBAR_PAGES + GetBonusBarOffset() - 1) * NUM_ACTIONBAR_BUTTONS);
  3.     slotID = slotID - bonusOffset;
  4.     local bar = math.floor(slotID / 10) + 1;
  5.     local btn = slotID % 10;
  6.  
  7.     local button = _G['ElvUI_Bar' .. bar .. 'Button' .. btn];

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?

Last edited by Sharji : 04-25-16 at 09:34 PM.
  Reply With Quote