fix: guard GetNumClasses in cooldown-table path with CLASS_SORT_ORDER fallback
This commit is contained in:
parent
b459963a29
commit
1b23a9179f
1 changed files with 11 additions and 3 deletions
|
|
@ -20068,9 +20068,17 @@ function LeaPlusLC:SlashFunc(str)
|
|||
|
||||
-- Create class tables (dynamic: covers DEATHKNIGHT and CoA custom classes)
|
||||
local classList = {}
|
||||
for i = 1, GetNumClasses() do
|
||||
local _, classFile = GetClassInfo(i)
|
||||
if classFile then tinsert(classList, classFile) end
|
||||
if GetNumClasses then
|
||||
for i = 1, GetNumClasses() do
|
||||
local _, classFile = GetClassInfo(i)
|
||||
if classFile then tinsert(classList, classFile) end
|
||||
end
|
||||
elseif CLASS_SORT_ORDER then
|
||||
-- CoA: GetNumClasses/GetClassInfo are FrameXML additions that may
|
||||
-- be absent; fall back to the stock class token list
|
||||
for i = 1, #CLASS_SORT_ORDER do
|
||||
tinsert(classList, CLASS_SORT_ORDER[i])
|
||||
end
|
||||
end
|
||||
for index = 1, #classList do
|
||||
if LeaPlusDB["Cooldowns"][classList[index]] == nil then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue