Skip to content

Commit

Permalink
Have to add scenario or its always disabled for env nps
Browse files Browse the repository at this point in the history
  • Loading branch information
Elv-Tukui committed Jan 11, 2025
1 parent 9eb2a60 commit 6cdf609
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ElvUI/Core/Defaults/Profile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,7 @@ P.nameplates = {
pvp = true,
resting = true,
world = true,
scenario = true,
},
friendlyEnabled = false,
friendly = {
Expand All @@ -961,6 +962,7 @@ P.nameplates = {
pvp = false,
resting = true,
world = true,
scenario = true,
},
stackingEnabled = false,
stackingNameplates = {
Expand All @@ -970,6 +972,7 @@ P.nameplates = {
pvp = true,
resting = false,
world = true,
scenario = true,
},
},
cutaway = {
Expand Down
1 change: 1 addition & 0 deletions ElvUI/Core/Modules/Nameplates/Nameplates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ElvUI_Options/Core/Nameplates.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6cdf609

Please sign in to comment.