File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1022,21 +1022,24 @@ local CategoryNames = { -- not sure how meaningful these really are (/Blizzard_C
10221022}
10231023
10241024--[[
1025- C_Console.GetAllCommands () returns a list of tables in this format:
1025+ ConsoleGetAllCommands () returns a list of tables in this format:
10261026 category: number from 0 to 9 representing a category above
10271027 command: cvar name
10281028 commandType: 0 seems to represent a cvar, 1 is a script command (like quit)
10291029 help: cvar description text
10301030--]]
10311031
1032+ -- C_Console.GetAllCommands is now ConsoleGetAllCommands as of 10.2.0
1033+ local ConsoleGetAllCommands = ConsoleGetAllCommands or C_Console and C_Console .GetAllCommands
1034+
10321035function addon :CVarExists (cvar )
10331036 return not not select (2 , pcall (function () return GetCVarInfo (cvar ) end ))
10341037end
10351038
10361039-- Returns filtered list of CVars
10371040function addon :GetCVars ()
10381041 local cvars = {}
1039- for _ , info in ipairs (C_Console . GetAllCommands ()) do
1042+ for _ , info in ipairs (ConsoleGetAllCommands ()) do
10401043 if info .commandType == 0 -- cvar, rather than script
10411044 and info .category ~= 0 -- ignore debug category
10421045 and not strfind (info .command :lower (), ' debug' ) -- a number of commands with "debug" in their name are inexplicibly not in the "debug" category
You can’t perform that action at this time.
0 commit comments