the reason that is not working is because :GetShortcut() returns the class Turbine.UI.Lotro.Shortcut
which isn't the data you want
this is what i do
Code:
quickslot.ShortcutChanged = function(sender, args)
local shortcut = sender:GetShortcut()
local type, data = shortcut:GetType(), shortcut:GetData()
if type == Turbine.UI.Lotro.ShortcutType.Undef then
DB.quickslots[sender._index] = nil
else
DB.quickslots[sender._index] = {type, data}
end
end
--and to load the data
if DB.quickslots[quickslot._index] then
quickslot:SetShortcut(Turbine.UI.Lotro.Shortcut(DB.quickslots[quickslot._index][1], DB.quickslots[quickslot._index][2]))
end
--quickslot._index is something i set to show what slot it represented