diff --git a/api/config.lua b/api/config.lua index 4a391da1..371afbe1 100644 --- a/api/config.lua +++ b/api/config.lua @@ -736,6 +736,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("nameplates", nil, "targetcastbar", "0") pfUI:UpdateConfig("nameplates", nil, "spellname", "0") pfUI:UpdateConfig("nameplates", nil, "showdebuffs", "1") + pfUI:UpdateConfig("nameplates", nil, "selfdebuff", "0") pfUI:UpdateConfig("nameplates", nil, "guessdebuffs", "1") pfUI:UpdateConfig("nameplates", nil, "clickthrough", "0") pfUI:UpdateConfig("nameplates", nil, "rightclick", "1") diff --git a/modules/gui.lua b/modules/gui.lua index 2d70aeb2..e3cdca40 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -2311,6 +2311,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(U["nameplates"], T["Debuff Icon Size"], C.nameplates, "debuffsize") CreateConfig(U["nameplates"], T["Estimate Debuffs"], C.nameplates, "guessdebuffs", "checkbox") CreateConfig(U["nameplates"], T["Show Debuff Stacks"], C.nameplates.debuffs, "showstacks", "checkbox") + CreateConfig(U["nameplates"], T["Only Show Own Debuffs (|cffffaaaaExperimental|r)"], C.nameplates, "selfdebuff", "checkbox") CreateConfig(U["nameplates"], T["Filter Mode"], C.nameplates.debuffs, "filter", "dropdown", pfUI.gui.dropdowns.buffbarfilter) CreateConfig(U["nameplates"], T["Blacklist"], C.nameplates.debuffs, "blacklist", "list") CreateConfig(U["nameplates"], T["Whitelist"], C.nameplates.debuffs, "whitelist", "list") diff --git a/modules/nameplates.lua b/modules/nameplates.lua index 74a196f8..89a3b1b5 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -193,7 +193,14 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function () if not self.debuffcache then self.debuffcache = {} end for id = 1, 16 do - local effect, _, texture, stacks, _, duration, timeleft = libdebuff:UnitDebuff(unitstr, id) + local effect, _, texture, stacks, _, duration, timeleft + + if unitstr and C.nameplates.selfdebuff == "1" then + effect, rank, texture, stacks, dtype, duration, timeleft = libdebuff:UnitOwnDebuff(unitstr, i) + else + effect, _, texture, stacks, _, duration, timeleft = libdebuff:UnitDebuff(unitstr, id) + end + if effect and timeleft and timeleft > 0 then local start = GetTime() - ( (duration or 0) - ( timeleft or 0) ) local stop = GetTime() + ( timeleft or 0 ) @@ -798,7 +805,10 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function () -- update all debuff icons for i = 1, 16 do local effect, rank, texture, stacks, dtype, duration, timeleft - if unitstr then + + if unitstr and C.nameplates.selfdebuff == "1" then + effect, rank, texture, stacks, dtype, duration, timeleft = libdebuff:UnitOwnDebuff(unitstr, i) + elseif unitstr then effect, rank, texture, stacks, dtype, duration, timeleft = libdebuff:UnitDebuff(unitstr, i) elseif plate.verify == verify then effect, rank, texture, stacks, dtype, duration, timeleft = plate:UnitDebuff(i)