Originally Posted by Duugu
New idea: I'll query all flyoutIDs up to ... whatever ... 1k and query and store all slots for flyoutIDs that exist on addon load.
|
That seems like a lot of unnecessary scanning. Just scan the player's spellbook for the flyouts that are actually available to them.
Lua Code:
local _, _, offset, numSpells = GetSpellTabInfo(2)
for i = offset, numSpells do
local skillType, skillID = GetSpellBookItemInfo("spell", i)
if skillType == "FLYOUT" then
local _, _, numSlots, isKnown = GetFlyoutInfo(skillID)
for j = 1, numSlots do
local spellID, overrideSpellID, isKnown, spellName, slotSpecID = GetFlyoutSlotInfo(skillID, j)
end
end
end
(I'm pretty sure nobody has any flyouts on the General tab, but if they do, just start the
i loop from 1 instead of
offset.)