mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-05 05:00:02 +00:00
nameplates: add experimental option to show own debuffs
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
+12
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user