nameplates: add experimental option to show own debuffs

This commit is contained in:
shagu
2025-05-25 14:28:17 +02:00
parent 5c42658b7e
commit 51924f0ca0
3 changed files with 14 additions and 2 deletions
+12 -2
View File
@@ -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)