Skip to content

Commit

Permalink
13.51
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Nov 15, 2023
2 parents 0658c54 + 044d6d8 commit b420508
Show file tree
Hide file tree
Showing 27 changed files with 150 additions and 145 deletions.
2 changes: 1 addition & 1 deletion ElvUI/Classic/Modules/Skins/Talent.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function S:Blizzard_TalentUI()
end
end

-- Talent preview section / SetCVar('previewTalents', 1)
-- Talent preview section / E:SetCVar('previewTalents', 1)
_G.PlayerTalentFramePreviewBar:StripTextures()
_G.PlayerTalentFramePreviewBarFiller:StripTextures()

Expand Down
3 changes: 1 addition & 2 deletions ElvUI/Core/General/API.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ local GetSpecialization = (E.Classic or E.Wrath) and LCS.GetSpecialization or Ge
local GetSpecializationInfo = (E.Classic or E.Wrath) and LCS.GetSpecializationInfo or GetSpecializationInfo

local IsAddOnLoaded = (C_AddOns and C_AddOns.IsAddOnLoaded) or IsAddOnLoaded
local SetCVar = C_CVar.SetCVar

local C_AddOns_GetAddOnEnableState = C_AddOns and C_AddOns.GetAddOnEnableState
local GetAddOnEnableState = GetAddOnEnableState -- eventually this will be on C_AddOns and args swap
Expand Down Expand Up @@ -601,7 +600,7 @@ function E:PLAYER_ENTERING_WORLD(_, initLogin, isReload)

-- Blizzard will set this value to int(60/CVar cameraDistanceMax)+1 at logout if it is manually set higher than that
if not E.Retail and E.db.general.lockCameraDistanceMax then
SetCVar('cameraDistanceMaxZoomFactor', E.db.general.cameraDistanceMax)
E:SetCVar('cameraDistanceMaxZoomFactor', E.db.general.cameraDistanceMax)
end

local _, instanceType = GetInstanceInfo()
Expand Down
8 changes: 4 additions & 4 deletions ElvUI/Core/General/Commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ local DisableAddOn = (C_AddOns and C_AddOns.DisableAddOn) or DisableAddOn
local EnableAddOn = (C_AddOns and C_AddOns.EnableAddOn) or EnableAddOn
local GetAddOnInfo = (C_AddOns and C_AddOns.GetAddOnInfo) or GetAddOnInfo
local GetNumAddOns = (C_AddOns and C_AddOns.GetNumAddOns) or GetNumAddOns
local SetCVar = C_CVar.SetCVar

-- GLOBALS: ElvUIGrid, ElvDB

function E:Grid(msg)
Expand Down Expand Up @@ -44,12 +44,12 @@ function E:LuaError(msg)
end
end

SetCVar('scriptErrors', 1)
E:SetCVar('scriptErrors', 1)
ReloadUI()
elseif switch == 'off' or switch == '0' then
if switch == 'off' then
SetCVar('scriptProfile', 0)
SetCVar('scriptErrors', 0)
E:SetCVar('scriptProfile', 0)
E:SetCVar('scriptErrors', 0)
E:Print('Lua errors off.')

if E:IsAddOnEnabled('ElvUI_CPU') then
Expand Down
36 changes: 17 additions & 19 deletions ElvUI/Core/General/Install.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ local VoiceTranscriptionFrame_UpdateEditBox = VoiceTranscriptionFrame_UpdateEdit
local VoiceTranscriptionFrame_UpdateVisibility = VoiceTranscriptionFrame_UpdateVisibility
local VoiceTranscriptionFrame_UpdateVoiceTab = VoiceTranscriptionFrame_UpdateVoiceTab

local SetCVar = C_CVar.SetCVar

local CLASS, CONTINUE, PREVIOUS = CLASS, CONTINUE, PREVIOUS
local LOOT, GENERAL, TRADE = LOOT, GENERAL, TRADE
local GUILD_EVENT_LOG = GUILD_EVENT_LOG
Expand Down Expand Up @@ -147,7 +145,7 @@ function E:SetupChat(noDisplayMsg)
end

if ELV_TOONS[PLAYER_NAME] then
SetCVar('scriptErrors', 1)
E:SetCVar('scriptErrors', 1)
end

if _G.InstallStepComplete and not noDisplayMsg then
Expand All @@ -157,21 +155,21 @@ function E:SetupChat(noDisplayMsg)
end

function E:SetupCVars(noDisplayMsg)
SetCVar('statusTextDisplay', 'BOTH')
SetCVar('screenshotQuality', 10)
SetCVar('showTutorials', 0)
SetCVar('showNPETutorials', 0)
SetCVar('UberTooltips', 1)
SetCVar('threatWarning', 3)
SetCVar('alwaysShowActionBars', 1)
SetCVar('lockActionBars', 1)
SetCVar('ActionButtonUseKeyDown', 1)
SetCVar('fstack_preferParentKeys', 0) -- Add back the frame names via fstack!
E:SetCVar('statusTextDisplay', 'BOTH')
E:SetCVar('screenshotQuality', 10)
E:SetCVar('showTutorials', 0)
E:SetCVar('showNPETutorials', 0)
E:SetCVar('UberTooltips', 1)
E:SetCVar('threatWarning', 3)
E:SetCVar('alwaysShowActionBars', 1)
E:SetCVar('lockActionBars', 1)
E:SetCVar('ActionButtonUseKeyDown', 1)
E:SetCVar('fstack_preferParentKeys', 0) -- Add back the frame names via fstack!

if E.Retail then
SetCVar('cameraDistanceMaxZoomFactor', 2.6) -- This has a setting on classic/tbc
E:SetCVar('cameraDistanceMaxZoomFactor', 2.6) -- This has a setting on classic/tbc
else
SetCVar('chatClassColorOverride', 0)
E:SetCVar('chatClassColorOverride', 0)
end

local ActionButtonPickUp = _G.InterfaceOptionsActionBarsPanelPickupActionKeyDropDown
Expand All @@ -185,10 +183,10 @@ function E:SetupCVars(noDisplayMsg)
end

if E.private.chat.enable then
SetCVar('chatMouseScroll', 1)
SetCVar('chatStyle', 'classic')
SetCVar('whisperMode', 'inline')
SetCVar('wholeChatWindowClickable', 0)
E:SetCVar('chatMouseScroll', 1)
E:SetCVar('chatStyle', 'classic')
E:SetCVar('whisperMode', 'inline')
E:SetCVar('wholeChatWindowClickable', 0)
end

if _G.InstallStepComplete and not noDisplayMsg then
Expand Down
3 changes: 1 addition & 2 deletions ElvUI/Core/General/StaticPopups.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ local DisableAddOn = (C_AddOns and C_AddOns.DisableAddOn) or DisableAddOn
local EnableAddOn = (C_AddOns and C_AddOns.EnableAddOn) or EnableAddOn
local IsAddOnLoaded = (C_AddOns and C_AddOns.IsAddOnLoaded) or IsAddOnLoaded
local PickupContainerItem = (C_Container and C_Container.PickupContainerItem) or PickupContainerItem
local SetCVar = C_CVar.SetCVar

local STATICPOPUP_TEXTURE_ALERT = STATICPOPUP_TEXTURE_ALERT
local STATICPOPUP_TEXTURE_ALERTGEAR = STATICPOPUP_TEXTURE_ALERTGEAR
Expand Down Expand Up @@ -387,7 +386,7 @@ E.PopupDialogs.SCRIPT_PROFILE = {
button1 = L["Disable"],
button2 = L["Continue"],
OnAccept = function()
SetCVar('scriptProfile', 0)
E:SetCVar('scriptProfile', 0)
ReloadUI()
end,
showAlert = 1,
Expand Down
3 changes: 1 addition & 2 deletions ElvUI/Core/Modules/ActionBars/ActionBars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ local ClearPetActionHighlightMarks = ClearPetActionHighlightMarks or PetActionBa
local ActionBarController_UpdateAllSpellHighlights = ActionBarController_UpdateAllSpellHighlights

local GetCVarBool = C_CVar.GetCVarBool
local SetCVar = C_CVar.SetCVar

local LAB = E.Libs.LAB
local LSM = E.Libs.LSM
Expand Down Expand Up @@ -1799,7 +1798,7 @@ function AB:Initialize()
end

-- We handle actionbar lock for regular bars, but the lock on PetBar needs to be handled by WoW so make some necessary updates
SetCVar('lockActionBars', (AB.db.lockActionBars and 1 or 0))
E:SetCVar('lockActionBars', AB.db.lockActionBars and 1 or 0)
_G.LOCK_ACTIONBAR = (AB.db.lockActionBars and '1' or '0') -- Keep an eye on this, in case it taints

if E.Retail then
Expand Down
6 changes: 2 additions & 4 deletions ElvUI/Core/Modules/DataTexts/System.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ local ResetCPUUsage = ResetCPUUsage
local UpdateAddOnCPUUsage = UpdateAddOnCPUUsage
local UpdateAddOnMemoryUsage = UpdateAddOnMemoryUsage

local SetCVar = C_CVar.SetCVar
local GetCVar = C_CVar.GetCVar
local GetCVarBool = C_CVar.GetCVarBool

local GetAddOnInfo = (C_AddOns and C_AddOns.GetAddOnInfo) or GetAddOnInfo
Expand All @@ -46,7 +44,7 @@ local homeLatencyString = '%d ms'
local kiloByteString = '%d kb'
local megaByteString = '%.2f mb'
local profilingString = '%s%s|r |cffffffff/|r %s%s|r'
local cpuProfiling = GetCVar('scriptProfile') == '1'
local cpuProfiling = GetCVarBool('scriptProfile')

local CombineAddOns = {
['DBM-Core'] = '^<DBM>',
Expand Down Expand Up @@ -86,7 +84,7 @@ end
local function OnClick()
local shiftDown, ctrlDown = IsShiftKeyDown(), IsControlKeyDown()
if shiftDown and ctrlDown then
SetCVar('scriptProfile', GetCVarBool('scriptProfile') and 0 or 1)
E:SetCVar('scriptProfile', GetCVarBool('scriptProfile') and 0 or 1)
ReloadUI()
elseif shiftDown and not ctrlDown then
collectgarbage('collect')
Expand Down
21 changes: 10 additions & 11 deletions ElvUI/Core/Modules/DataTexts/Volume.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ local IsShiftKeyDown = IsShiftKeyDown
local ShowOptionsPanel = ShowOptionsPanel
local SOUND = SOUND

local SetCVar = C_CVar.SetCVar
local GetCVar = C_CVar.GetCVar
local GetCVarBool = C_CVar.GetCVarBool

Expand Down Expand Up @@ -57,17 +56,17 @@ local function GetStreamString(stream, tooltip)
return (tooltip and format('|cFF%s%.f%%|r', color, level)) or format('%s: |cFF%s%.f%%|r', stream.Name, color, level)
end

local function SelectStream(_, ...)
activeIndex = ...
activeStream = AudioStreams[activeIndex]
local function SelectStream(_, arg1)
activeIndex = arg1
activeStream = AudioStreams[arg1]

panelText:SetText(GetStreamString(activeStream))
end

local function ToggleStream(_, ...)
local Stream = AudioStreams[...]
local function ToggleStream(_, arg1)
local Stream = AudioStreams[arg1]

SetCVar(Stream.Enabled, GetCVarBool(Stream.Enabled) and 0 or 1, 'ELVUI_VOLUME')
E:SetCVar(Stream.Enabled, GetCVarBool(Stream.Enabled) and 0 or 1, 'ELVUI_VOLUME')

panelText:SetText(GetStreamString(activeStream))
end
Expand All @@ -77,8 +76,8 @@ for Index, Stream in ipairs(AudioStreams) do
tinsert(toggleMenu, { text = Stream.Name, checked = function() return GetCVarBool(Stream.Enabled) end, func = ToggleStream, arg1 = Index})
end

local function SelectSoundOutput(_, ...)
SetCVar('Sound_OutputDriverIndex', ..., 'ELVUI_VOLUME')
local function SelectSoundOutput(_, arg1)
E:SetCVar('Sound_OutputDriverIndex', arg1, 'ELVUI_VOLUME')
Sound_GameSystem_RestartSoundSystem()
end

Expand Down Expand Up @@ -125,7 +124,7 @@ local function onMouseWheel(_, delta)
vol = 0
end

SetCVar(activeStream.Volume, vol, 'ELVUI_VOLUME')
E:SetCVar(activeStream.Volume, vol, 'ELVUI_VOLUME')
panelText:SetText(GetStreamString(activeStream))
end

Expand Down Expand Up @@ -158,7 +157,7 @@ local function OnClick(self, button)
E:SetEasyMenuAnchor(E.EasyMenu, self)
EasyMenu(menu, E.EasyMenu, nil, nil, nil, 'MENU')
elseif button == 'MiddleButton' then
SetCVar(AudioStreams[1].Enabled, GetCVarBool(AudioStreams[1].Enabled) and 0 or 1, 'ELVUI_VOLUME')
E:SetCVar(AudioStreams[1].Enabled, GetCVarBool(AudioStreams[1].Enabled) and 0 or 1, 'ELVUI_VOLUME')
elseif button == 'RightButton' then
E:SetEasyMenuAnchor(E.EasyMenu, self)
EasyMenu(IsShiftKeyDown() and deviceMenu or toggleMenu, E.EasyMenu, nil, nil, nil, 'MENU')
Expand Down
2 changes: 1 addition & 1 deletion ElvUI/Core/Modules/Maps/Worldmap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ function M:Initialize()
-- Enable/Disable map fading when moving
-- currently we dont need to touch this cvar because we have our own control for this currently
-- see the comment in `M:UpdateMapFade` about `durationSec` for more information
-- SetCVar('mapFade', E.global.general.fadeMapWhenMoving and 1 or 0)
-- E:SetCVar('mapFade', E.global.general.fadeMapWhenMoving and 1 or 0)
end

E:RegisterModule(M:GetName())
3 changes: 1 addition & 2 deletions ElvUI/Core/Modules/Misc/AFK.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ local ChatHistory_GetAccessID = ChatHistory_GetAccessID
local ChatFrame_GetMobileEmbeddedTexture = ChatFrame_GetMobileEmbeddedTexture

local C_PetBattles_IsInBattle = C_PetBattles and C_PetBattles.IsInBattle
local SetCVar = C_CVar.SetCVar

local CinematicFrame = _G.CinematicFrame
local MovieFrame = _G.MovieFrame
Expand Down Expand Up @@ -235,7 +234,7 @@ function AFK:Toggle()
AFK:RegisterEvent('LFG_PROPOSAL_SHOW', 'OnEvent')
AFK:RegisterEvent('UPDATE_BATTLEFIELD_STATUS', 'OnEvent')

SetCVar('autoClearAFK', '1')
E:SetCVar('autoClearAFK', 1)
else
AFK:UnregisterEvent('PLAYER_FLAGS_CHANGED')
AFK:UnregisterEvent('PLAYER_REGEN_DISABLED')
Expand Down
Loading

0 comments on commit b420508

Please sign in to comment.