Skip to content

Commit

Permalink
move it up
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Jan 6, 2025
1 parent d08e86b commit d32aeb9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ElvUI/Core/Modules/Nameplates/Nameplates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ function NP:ToggleCVar(cvar, enabled)
E:SetCVar(cvar, enabled and 1 or 0)
end

function NP:CombatCVar(cvar, option, switch)
if option == 'TOGGLE_ON' then
E:SetCVar(cvar, switch and 1 or 0)
elseif option == 'TOGGLE_OFF' then
E:SetCVar(cvar, switch and 0 or 1)
end
end

function NP:SetCVars()
local db = NP.db

Expand Down Expand Up @@ -214,14 +222,6 @@ function NP:SetCVars()
E:SetCVar('nameplatePlayerMaxDistance', 60)
end

function NP:CombatCVar(cvar, option, switch)
if option == 'TOGGLE_ON' then
E:SetCVar(cvar, switch and 1 or 0)
elseif option == 'TOGGLE_OFF' then
E:SetCVar(cvar, switch and 0 or 1)
end
end

function NP:PLAYER_REGEN_DISABLED()
NP:CombatCVar('nameplateShowFriends', NP.db.showFriendlyCombat, true)
NP:CombatCVar('nameplateShowEnemies', NP.db.showEnemyCombat, true)
Expand Down

0 comments on commit d32aeb9

Please sign in to comment.