C_CVar.GetCVarInfo

From Warcraft Wiki
Jump to navigation Jump to search
GitHub Octocat.png  Townlong-Yak BAD.png  ProfIcons engineering.png  BTNTemp.png C_CVar.GetCVarInfo TheWarWithin-Icon-Inline.pngDragonflight-Icon-Inline.pngCata-Logo-Small.pngWoW Icon update.png + 10.2.0 / 1.15.0
Wowprogramming.png  BTNTemp.png GetCVarInfo Wrath-Logo-Small.png + 3.0.2 / 1.13.2

Returns information on a console variable.

value, defaultValue, isStoredServerAccount, isStoredServerCharacter, isLockedFromUser, isSecure, isReadOnly = C_CVar.GetCVarInfo(name)

Arguments

name
string - Name of the CVar to query the value of. Only accepts console variables (i.e. not console commands).

Returns

value
string - Current value of the CVar.
defaultValue
string - Default value of the CVar.
isStoredServerAccount
boolean - If the CVar scope is set WoW account-wide. Stored on the server per CVar synchronizeConfig
isStoredServerCharacter
boolean - If the CVar scope is character-specific. Stored on the server per CVar synchronizeConfig
isLockedFromUser
boolean
isSecure
boolean - If the CVar cannot be set with SetCVar while in combat, which would fire ADDON_ACTION_BLOCKED. It's also not possible to set these via /console. Most nameplate cvars are secure.
isReadOnly
boolean - Returns true for portal, serverAlert, timingTestError. These CVars cannot be changed.

Patch changes

Dragonflight Patch 10.2.0 (2023-11-07): Moved to the C_CVar namespace. An alias from the old function name still exists but will be removed in a future patch.
Wrath-Logo-Small.png Patch 3.0.2 (2008-10-14): Added.