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:
function TDButton_FetchElvUI()
local ret = false;
for x = 1, 10 do
for i = 1, 12 do
local button = _G['ElvUI_Bar' .. x .. 'Button' .. i];
if button then
local spellId = button:GetSpellId();
if spellId then
local actionName, _ = GetSpellInfo(spellId);
if actionName then
if TDButton_Spells[actionName] == nil then
TDButton_Spells[actionName] = {};
end
ret = true;
tinsert(TDButton_Spells[actionName], button);
end
end
end
end
end
return ret;
end
Is there a way to make it work? Scanning them each time bar changes does not seem like a good idea