Right now I'm iterating the full mounts list on SPELLS_CHANGED to build a list of mount names/spellIDs and passing that list to the secure environement:
Lua Code:
for i = 1, 1000 do
ClearCursor()
local Mname, spellID = C_MountJournal.GetMountInfo(i)
C_MountJournal.Pickup(i)
local _, cnum = GetCursorInfo()
if cnum then
tSpellRepositoryString = tSpellRepositoryString..","..Mname.."-"..spellID
end
end
for i, v in pairs(BAB.DB.Bars) do
v.header:SetAttribute("SpellRepository", tSpellRepositoryString)
end
Then I'm using the list to find a mounts spellID for use with type/spell on my action button:
Lua Code:
local tSpellRepository = self:GetParent():GetAttribute('SpellRepository')
if tSpellRepository then
for spell in string.gmatch(self:GetParent():GetAttribute('SpellRepository'), '([^%,]+)') do
local tn, ti = string.match(spell, '(.+)-(.+)')
if tn == buttonAction then
buttonAction = ti
end
end
end
Clearly not the best approach.
But I'll definetly not touch this black hole again before WoD is in a final state. Who knows what they come up with next?