-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathAPI.lua
More file actions
27 lines (23 loc) · 717 Bytes
/
API.lua
File metadata and controls
27 lines (23 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
local addonName, TalentLoadouts = ...
ITLAPI = {}
function ITLAPI:EnumerateSpecLoadouts()
if not TalentLoadouts.initialized then return function() end end
local last
return function()
local k,v = next(TalentLoadouts.globalDB.configIDs[TalentLoadouts.specID], last)
last = k
if k then
return k, v
end
end
end
function ITLAPI:GetCurrentLoadout()
local configID = TalentLoadouts.charDB.lastLoadout
if configID then
local configInfo = TalentLoadouts.globalDB.configIDs[TalentLoadouts.specID][configID]
return configInfo
end
end
function ITLAPI:GetExportStringForCurrentTree()
return TalentLoadouts:GetExportStringForTree()
end