From cf3f1e5440e2d7fc275f3aefa337f8181917208f Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Fri, 24 Jul 2026 15:02:38 -0500 Subject: [PATCH] Rework raid self/group frame visibility and rename the solo option - selfinraid now gates on `not IsInGroup()`, so "show self in raid frames" applies only when truly solo (both party and raid suppress it), matching the option's actual behavior. - Hide the redundant group frames when a party is promoted to the raid grid (raidforgroup + hide_in_raid), not just in an actual raid. A shared hide_group local drives both the party-member and self branches; the party-member branch is scoped to cache_raid == 0 so the raidforgroup-mapped raid frames (which themselves carry label "party") aren't hidden too. - Rename "Always Show Self In Raid Frames" to "Show Self In Raid Frames When Solo" in gui.lua and all locale files; the four previously-translated strings are reset to nil stubs since the meaning changed. --- api/unitframes.lua | 17 ++++++++++++----- env/translations_deDE.lua | 2 +- env/translations_enUS.lua | 2 +- env/translations_esES.lua | 2 +- env/translations_frFR.lua | 2 +- env/translations_koKR.lua | 2 +- env/translations_ruRU.lua | 2 +- env/translations_zhCN.lua | 2 +- env/translations_zhTW.lua | 2 +- modules/gui.lua | 4 ++-- 10 files changed, 22 insertions(+), 15 deletions(-) diff --git a/api/unitframes.lua b/api/unitframes.lua index 88c06b77..e93934a7 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -304,7 +304,7 @@ function pfUI.uf:UpdateVisibility() local id = self.cache_raid -- always show self in raidframes - if not IsInRaid() and IsInGroup() and C.unitframes.selfinraid == "1" and id == 1 then + if not IsInGroup() and C.unitframes.selfinraid == "1" and id == 1 then self.id = "" self.label = "player" @@ -338,6 +338,12 @@ function pfUI.uf:UpdateVisibility() local unitstr = string.format("%s%s", self.label or "", self.id or "") local visibility = string.format("[target=%s,exists] show; hide", unitstr) + -- Group frames are redundant when the group is already shown as a raid grid: + -- either an actual raid, or a party promoted to the raid grid via + -- raidforgroup. hide_in_raid gates whether we hide them in that case. + local hide_group = C["unitframes"]["group"]["hide_in_raid"] == "1" + and (IsInRaid() or (C.unitframes.raidforgroup == "1" and IsInGroup())) + if pfUI.unlock and pfUI.unlock:IsShown() then -- display during unlock mode visibility = "show" @@ -346,13 +352,14 @@ function pfUI.uf:UpdateVisibility() -- frame shall not be visible visibility = "hide" self.visible = nil - elseif C["unitframes"]["group"]["hide_in_raid"] == "1" and self.label and strsub(self.label,0,5) == "party" and IsInRaid() then - -- hide group while in raid and option is set + elseif hide_group and self.cache_raid == 0 and self.label and strsub(self.label,0,5) == "party" then + -- hide group while shown as a raid grid and option is set (raid frames + -- carry label "party" under raidforgroup, so exclude them by cache_raid) visibility = "hide" self.visible = nil elseif ( self.fname == "Group0" or self.fname == "PartyPet0" or self.fname == "Party0Target" ) - and (not IsInGroup() or (C["unitframes"]["group"]["hide_in_raid"] == "1" and IsInRaid())) then - -- hide self in group if solo or hide in raid is set + and (not IsInGroup() or hide_group) then + -- hide self in group if solo or shown as a raid grid visibility = "hide" self.visible = nil end diff --git a/env/translations_deDE.lua b/env/translations_deDE.lua index c9029b92..6bc81b0e 100644 --- a/env/translations_deDE.lua +++ b/env/translations_deDE.lua @@ -27,7 +27,6 @@ pfUI_translation["deDE"] = { ["Always Show Item Comparison"] = nil, ["Always Show On Target Units"] = nil, ["Always Show On Units With Missing HP"] = nil, - ["Always Show Self In Raid Frames"] = nil, ["Always Use 2D Portraits"] = nil, ["Ammo Counter"] = nil, ["Anchor Bags Above Chat"] = nil, @@ -741,6 +740,7 @@ pfUI_translation["deDE"] = { ["Show Required Questitem Count"] = nil, ["Show Resting"] = nil, ["Show Self In Group Frames"] = nil, + ["Show Self In Raid Frames When Solo"] = nil, ["Show Spell Icon"] = nil, ["Show Spell Name"] = nil, ["Show Stacks"] = nil, diff --git a/env/translations_enUS.lua b/env/translations_enUS.lua index b6b835b2..6343c000 100644 --- a/env/translations_enUS.lua +++ b/env/translations_enUS.lua @@ -28,7 +28,6 @@ pfUI_translation["enUS"] = { ["Always Show Item Comparison"] = nil, ["Always Show On Target Units"] = nil, ["Always Show On Units With Missing HP"] = nil, - ["Always Show Self In Raid Frames"] = nil, ["Always Use 2D Portraits"] = nil, ["Ammo Counter"] = nil, ["Anchor Bags Above Chat"] = nil, @@ -750,6 +749,7 @@ pfUI_translation["enUS"] = { ["Show Required Questitem Count"] = nil, ["Show Resting"] = nil, ["Show Self In Group Frames"] = nil, + ["Show Self In Raid Frames When Solo"] = nil, ["Show Spell Icon"] = nil, ["Show Spell Name"] = nil, ["Show Stacks"] = nil, diff --git a/env/translations_esES.lua b/env/translations_esES.lua index 2c9142d6..b624bcbc 100644 --- a/env/translations_esES.lua +++ b/env/translations_esES.lua @@ -27,7 +27,6 @@ pfUI_translation["esES"] = { ["Always Show Item Comparison"] = "Mostrar siempre la comparativa entre objetos", ["Always Show On Target Units"] = "Mostrar siempre en el objectivo", ["Always Show On Units With Missing HP"] = "Mostrar siempre en unidades con falta de salud", - ["Always Show Self In Raid Frames"] = "Mostrarse siempre a sí mismo en los marcos de banda", ["Always Use 2D Portraits"] = "Usar siempre retratos 2D", ["Ammo Counter"] = "Contador de munición", ["Anchor Bags Above Chat"] = nil, @@ -741,6 +740,7 @@ pfUI_translation["esES"] = { ["Show Required Questitem Count"] = "Muestra el número requerido de objetos de misión", ["Show Resting"] = "Mostrar descanso", ["Show Self In Group Frames"] = "Mostrar a sí mismo en marcos de grupo", + ["Show Self In Raid Frames When Solo"] = nil, ["Show Spell Icon"] = "Mostrar icono de hechizo", ["Show Spell Name"] = nil, ["Show Stacks"] = "Mostrar pilas", diff --git a/env/translations_frFR.lua b/env/translations_frFR.lua index b4dec778..21231fd4 100644 --- a/env/translations_frFR.lua +++ b/env/translations_frFR.lua @@ -27,7 +27,6 @@ pfUI_translation["frFR"] = { ["Always Show Item Comparison"] = "Toujours afficher la comparaison d'objet", ["Always Show On Target Units"] = "Toujours montrer sur la cible", ["Always Show On Units With Missing HP"] = "Toujours montrer sur les cibles avec de la vie manquante", - ["Always Show Self In Raid Frames"] = "Toujours montrer soi-même dans le cadre de raid", ["Always Use 2D Portraits"] = "Toujours utiliser les portraits 2D", ["Ammo Counter"] = "Compteur de munitions", ["Anchor Bags Above Chat"] = nil, @@ -741,6 +740,7 @@ pfUI_translation["frFR"] = { ["Show Required Questitem Count"] = nil, ["Show Resting"] = "Afficher au repos", ["Show Self In Group Frames"] = "S'afficher dans les cadres de groupe", + ["Show Self In Raid Frames When Solo"] = nil, ["Show Spell Icon"] = "Afficher l'icone des sorts", ["Show Spell Name"] = nil, ["Show Stacks"] = "Afficher les empilements", diff --git a/env/translations_koKR.lua b/env/translations_koKR.lua index 5fd796eb..3356b4ec 100644 --- a/env/translations_koKR.lua +++ b/env/translations_koKR.lua @@ -27,7 +27,6 @@ pfUI_translation["koKR"] = { ["Always Show Item Comparison"] = "항상 착용 장비와 비교 표시", ["Always Show On Target Units"] = nil, ["Always Show On Units With Missing HP"] = nil, - ["Always Show Self In Raid Frames"] = nil, ["Always Use 2D Portraits"] = "항상 2D초상화 사용", ["Ammo Counter"] = "탄약 갯수", ["Anchor Bags Above Chat"] = nil, @@ -741,6 +740,7 @@ pfUI_translation["koKR"] = { ["Show Required Questitem Count"] = nil, ["Show Resting"] = nil, ["Show Self In Group Frames"] = nil, + ["Show Self In Raid Frames When Solo"] = nil, ["Show Spell Icon"] = nil, ["Show Spell Name"] = nil, ["Show Stacks"] = nil, diff --git a/env/translations_ruRU.lua b/env/translations_ruRU.lua index 7bb7282c..3b938cce 100644 --- a/env/translations_ruRU.lua +++ b/env/translations_ruRU.lua @@ -27,7 +27,6 @@ pfUI_translation["ruRU"] = { ["Always Show Item Comparison"] = "Всегда показывать сравнение предметов", ["Always Show On Target Units"] = "Всегда показывать над выбранной целью", ["Always Show On Units With Missing HP"] = "Всегда показывать над целями с неполным здоровьем", - ["Always Show Self In Raid Frames"] = "Всегда показывать себя в рейде", ["Always Use 2D Portraits"] = "Всегда использовать 2D-портреты", ["Ammo Counter"] = "Счетчик боеприпасов", ["Anchor Bags Above Chat"] = nil, @@ -741,6 +740,7 @@ pfUI_translation["ruRU"] = { ["Show Required Questitem Count"] = "Показать необходимое количество предметов для задания", ["Show Resting"] = "Показать иконку отдыха", ["Show Self In Group Frames"] = "Показать себя в окне группы", + ["Show Self In Raid Frames When Solo"] = nil, ["Show Spell Icon"] = "Показать иконку заклинания", ["Show Spell Name"] = "Показать название заклинания", ["Show Stacks"] = "Показать стаки", diff --git a/env/translations_zhCN.lua b/env/translations_zhCN.lua index 7d2c07a7..aac48852 100644 --- a/env/translations_zhCN.lua +++ b/env/translations_zhCN.lua @@ -27,7 +27,6 @@ pfUI_translation["zhCN"] = { ["Always Show Item Comparison"] = "始终显示装备比较(或按SHIFT键)", ["Always Show On Target Units"] = "始终在目标单位上显示", ["Always Show On Units With Missing HP"] = "始终在未满血单位上显示", - ["Always Show Self In Raid Frames"] = "始终在团队框架中显示自己", ["Always Use 2D Portraits"] = "始终使用2D头像", ["Ammo Counter"] = "弹药数量", ["Anchor Bags Above Chat"] = "将背包锚定在聊天框上方", @@ -742,6 +741,7 @@ pfUI_translation["zhCN"] = { ["Show Required Questitem Count"] = "显示所需的任务物品计数", ["Show Resting"] = "显示休息图标", ["Show Self In Group Frames"] = "在队伍框架中显示自己", + ["Show Self In Raid Frames When Solo"] = nil, ["Show Spell Icon"] = "显示技能图标", ["Show Spell Name"] = "显示技能名称", ["Show Stacks"] = "显示堆叠", diff --git a/env/translations_zhTW.lua b/env/translations_zhTW.lua index e0eae7cb..4c4dcf41 100644 --- a/env/translations_zhTW.lua +++ b/env/translations_zhTW.lua @@ -27,7 +27,6 @@ pfUI_translation["zhTW"] = { ["Always Show Item Comparison"] = "始終顯示裝備比較", ["Always Show On Target Units"] = nil, ["Always Show On Units With Missing HP"] = nil, - ["Always Show Self In Raid Frames"] = nil, ["Always Use 2D Portraits"] = "始終使用2D頭像", ["Ammo Counter"] = "彈藥數量", ["Anchor Bags Above Chat"] = nil, @@ -741,6 +740,7 @@ pfUI_translation["zhTW"] = { ["Show Required Questitem Count"] = nil, ["Show Resting"] = nil, ["Show Self In Group Frames"] = nil, + ["Show Self In Raid Frames When Solo"] = nil, ["Show Spell Icon"] = nil, ["Show Spell Name"] = nil, ["Show Stacks"] = nil, diff --git a/modules/gui.lua b/modules/gui.lua index 654f028f..c54ffb75 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -2120,9 +2120,9 @@ pfUI:RegisterModule("gui", function () CreateConfig(nil, T["Enable 40y-Range Check"], C.unitframes, "rangecheck", "checkbox", nil, nil, nil, nil) CreateConfig(nil, T["Range Check Mode"], C.unitframes, "rangecheck_mode", "dropdown", pfUI.gui.dropdowns.uf_rangecheck_mode, nil, nil, nil) CreateConfig(nil, T["UnitXP Range Threshold (yards)"], C.unitframes, "rangecheck_distance", nil, nil, nil, nil, nil) - CreateConfig(nil, T["Use Raid Frames To Display Group Members"], C.unitframes, "raidforgroup", "checkbox") - CreateConfig(nil, T["Always Show Self In Raid Frames"], C.unitframes, "selfinraid", "checkbox") + CreateConfig(nil, T["Show Self In Raid Frames When Solo"], C.unitframes, "selfinraid", "checkbox") CreateConfig(nil, T["Show Self In Group Frames"], C.unitframes, "selfingroup", "checkbox") + CreateConfig(nil, T["Use Raid Frames To Display Group Members"], C.unitframes, "raidforgroup", "checkbox") CreateConfig(nil, T["Hide Group Frames While In Raid"], C.unitframes.group, "hide_in_raid", "checkbox") CreateConfig(nil, T["Max Amount Of Raid Frames"], C.unitframes, "maxraid", "dropdown", pfUI.gui.dropdowns.maxraid)