Skip to content

Commit

Permalink
Refactor SetCVar usage to utilize E:SetCVar for SoftTargetInteract se…
Browse files Browse the repository at this point in the history
…ttings
  • Loading branch information
NoobTaco committed Dec 20, 2024
1 parent 14573e3 commit 82ba99c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions core/Code.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 82ba99c

Please sign in to comment.