From 82ba99c89869d1523bb99fcdb1f31960e64b7141 Mon Sep 17 00:00:00 2001 From: Mike Norton Date: Fri, 20 Dec 2024 07:10:17 -0800 Subject: [PATCH] Refactor SetCVar usage to utilize E:SetCVar for SoftTargetInteract settings --- core/Code.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/core/Code.lua b/core/Code.lua index 7bcd8d9..24a2020 100644 --- a/core/Code.lua +++ b/core/Code.lua @@ -391,10 +391,6 @@ end -- Create a unique table for our plugin P[MyPluginName] = {} --- Declare SetCVar as a global function to suppress the warning -_G.SetCVar = _G.SetCVar or function() - end - -- This function will handle initialization of the addon function mod:Initialize() -- Initiate installation process if ElvUI install is complete and our plugin install has not yet been run @@ -409,9 +405,9 @@ function mod:Initialize() -- check if enableInteraction is true or false if E.db[MyPluginName].enableInteraction then - SetCVar("SoftTargetInteract", 3) + E:SetCVar("SoftTargetInteract", 3) else - SetCVar("SoftTargetInteract", 0) + E:SetCVar("SoftTargetInteract", 0) end end