-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix missing GetCVarInfo function in Classic
- Loading branch information
Showing
5 changed files
with
22 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
local addonName, addon = ... | ||
|
||
-------------------------------------- | ||
-- Utility functions | ||
-------------------------------------- | ||
|
||
-- C_Console.GetAllCommands is now ConsoleGetAllCommands as of 10.2.0 | ||
addon.GetAllCommands = ConsoleGetAllCommands or C_Console and C_Console.GetAllCommands | ||
|
||
-- GetCVarInfo moved to C_CVar | ||
-- value, defaultValue, isStoredServerAccount, isStoredServerCharacter, isLockedFromUser, isSecure, isReadOnly | ||
addon.GetCVarInfo = GetCVarInfo or C_CVar and C_CVar.GetCVarInfo | ||
|
||
function addon:CVarExists(cvar) | ||
return not not select(2, pcall(function() return addon.GetCVarInfo(cvar) end)) | ||
end |