From 6cdf6097a0e3368391092d3ab7fbe306fcc6850a Mon Sep 17 00:00:00 2001 From: Elv <90285628+Elv-Tukui@users.noreply.github.com> Date: Sat, 11 Jan 2025 00:23:49 -0500 Subject: [PATCH 1/2] Have to add scenario or its always disabled for env nps --- ElvUI/Core/Defaults/Profile.lua | 3 +++ ElvUI/Core/Modules/Nameplates/Nameplates.lua | 1 + ElvUI_Options/Core/Nameplates.lua | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ElvUI/Core/Defaults/Profile.lua b/ElvUI/Core/Defaults/Profile.lua index 16a116c825..e964728c81 100644 --- a/ElvUI/Core/Defaults/Profile.lua +++ b/ElvUI/Core/Defaults/Profile.lua @@ -952,6 +952,7 @@ P.nameplates = { pvp = true, resting = true, world = true, + scenario = true, }, friendlyEnabled = false, friendly = { @@ -961,6 +962,7 @@ P.nameplates = { pvp = false, resting = true, world = true, + scenario = true, }, stackingEnabled = false, stackingNameplates = { @@ -970,6 +972,7 @@ P.nameplates = { pvp = true, resting = false, world = true, + scenario = true, }, }, cutaway = { diff --git a/ElvUI/Core/Modules/Nameplates/Nameplates.lua b/ElvUI/Core/Modules/Nameplates/Nameplates.lua index ec00c0e91b..962f141025 100644 --- a/ElvUI/Core/Modules/Nameplates/Nameplates.lua +++ b/ElvUI/Core/Modules/Nameplates/Nameplates.lua @@ -591,6 +591,7 @@ function NP:EnviromentConditionals() end -- Handle enemy nameplates if enemy combat toggle is not set + print(env.enemyEnabled, db.showEnemyCombat, value, env.enemy[value]) if env.enemyEnabled and db.showEnemyCombat == 'DISABLED' then NP:ToggleCVar('nameplateShowEnemies', env.enemy[value]) end diff --git a/ElvUI_Options/Core/Nameplates.lua b/ElvUI_Options/Core/Nameplates.lua index 70cc8ae839..2898fa3c9b 100644 --- a/ElvUI_Options/Core/Nameplates.lua +++ b/ElvUI_Options/Core/Nameplates.lua @@ -444,7 +444,7 @@ NamePlates.generalGroup.args.plateVisibility.args.playerVisibility.args.alphaDel NamePlates.generalGroup.args.plateVisibility.args.enemyVisibility = ACH:MultiSelect(L["Enemy"], nil, 10, { guardians = L["Guardians"], minions = L["Minions"], minus = L["Minus"], pets = L["Pets"], totems = L["Totems"] }, nil, nil, function(_, key) return E.db.nameplates.visibility.enemy[key] end, function(_, key, value) E.db.nameplates.visibility.enemy[key] = value NP:SetCVars() NP:ConfigureAll() end, function() return not E.db.nameplates.visibility.showAll end) NamePlates.generalGroup.args.plateVisibility.args.friendlyVisibility = ACH:MultiSelect(L["Friendly"], nil, 15, { guardians = L["Guardians"], minions = L["Minions"], npcs = L["NPC"], pets = L["Pets"], totems = L["Totems"] }, nil, nil, function(_, key) return E.db.nameplates.visibility.friendly[key] end, function(_, key, value) E.db.nameplates.visibility.friendly[key] = value NP:SetCVars() NP:ConfigureAll() end, function() return not E.db.nameplates.visibility.showAll end) -local envConditions = { party = L["Dungeons"], raid = L["Raids"], arena = L["Arena"], pvp = L["Battleground"], resting = L["Resting"], world = L["World"] } +local envConditions = { party = L["Dungeons"], raid = L["Raids"], scenario = L["Scenario"], arena = L["Arena"], pvp = L["Battleground"], resting = L["Resting"], world = L["World"] } NamePlates.generalGroup.args.enviromentConditions = ACH:Group(L["Enviroment Conditions"], nil, 60, nil, function(info) return E.db.nameplates.enviromentConditions[info[#info]] end, function(info, value) E.db.nameplates.enviromentConditions[info[#info]] = value NP:EnviromentConditionals() end) NamePlates.generalGroup.args.enviromentConditions.args.enemyEnabled = ACH:Toggle(E.NewSign..L["Enemy Enabled"], L["This option controls whether nameplates will follow the visibility settings below.\n|cffFF3333Warning:|r This will be overridden by the Enemy Combat Toggle."], 10, nil, nil, 250) NamePlates.generalGroup.args.enviromentConditions.args.enemy = ACH:MultiSelect(L["Enemy"], nil, 11, envConditions, nil, nil, function(_, key) return E.db.nameplates.enviromentConditions.enemy[key] end, function(_, key, value) E.db.nameplates.enviromentConditions.enemy[key] = value NP:EnviromentConditionals() end, nil, function() return not E.db.nameplates.enviromentConditions.enemyEnabled end) From 0b6fe90eee97ae7e6e21e6f6179ea289e6d78221 Mon Sep 17 00:00:00 2001 From: Simpy Date: Sat, 11 Jan 2025 03:23:37 -0500 Subject: [PATCH 2/2] remove debug line --- ElvUI/Core/Modules/Nameplates/Nameplates.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/ElvUI/Core/Modules/Nameplates/Nameplates.lua b/ElvUI/Core/Modules/Nameplates/Nameplates.lua index 962f141025..ec00c0e91b 100644 --- a/ElvUI/Core/Modules/Nameplates/Nameplates.lua +++ b/ElvUI/Core/Modules/Nameplates/Nameplates.lua @@ -591,7 +591,6 @@ function NP:EnviromentConditionals() end -- Handle enemy nameplates if enemy combat toggle is not set - print(env.enemyEnabled, db.showEnemyCombat, value, env.enemy[value]) if env.enemyEnabled and db.showEnemyCombat == 'DISABLED' then NP:ToggleCVar('nameplateShowEnemies', env.enemy[value]) end