From d464cd4289c6c6b603a572950c726db8f8e351b9 Mon Sep 17 00:00:00 2001 From: shagu Date: Tue, 4 Jul 2023 09:53:29 +0200 Subject: [PATCH] nameplates: add option to only show target castbar --- api/config.lua | 1 + modules/gui.lua | 1 + modules/nameplates.lua | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/api/config.lua b/api/config.lua index afffa6df..1196ef3e 100644 --- a/api/config.lua +++ b/api/config.lua @@ -671,6 +671,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("nameplates", nil, "legacy", "0") pfUI:UpdateConfig("nameplates", nil, "overlap", "0") pfUI:UpdateConfig("nameplates", nil, "showcastbar", "1") + pfUI:UpdateConfig("nameplates", nil, "targetcastbar", "0") pfUI:UpdateConfig("nameplates", nil, "spellname", "0") pfUI:UpdateConfig("nameplates", nil, "showdebuffs", "1") pfUI:UpdateConfig("nameplates", nil, "guessdebuffs", "1") diff --git a/modules/gui.lua b/modules/gui.lua index 1bd18e65..64dddd4c 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -2208,6 +2208,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(nil, T["Castbar"], nil, nil, "header") CreateConfig(U["nameplates"], T["Enable Castbars"], C.nameplates, "showcastbar", "checkbox") + CreateConfig(U["nameplates"], T["Only Show Target Castbar"], C.nameplates, "targetcastbar", "checkbox") CreateConfig(U["nameplates"], T["Enable Spellname"], C.nameplates, "spellname", "checkbox") CreateConfig(U["nameplates"], T["Castbar Height"], C.nameplates, "heightcast") diff --git a/modules/nameplates.lua b/modules/nameplates.lua index c744601f..a86278ab 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -865,7 +865,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function () end -- castbar update - if C.nameplates["showcastbar"] == "1" then + if C.nameplates["showcastbar"] == "1" and ( C.nameplates["targetcastbar"] == "0" or target ) then local cast, nameSubtext, text, texture, startTime, endTime, isTradeSkill = UnitCastingInfo(target and "target" or name) if not cast then