mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-10 15:40:01 +00:00
unitframes: add experimental option to show own debuffs
This commit is contained in:
@@ -417,6 +417,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("unitframes", unit, "debuffsize", "20")
|
||||
pfUI:UpdateConfig("unitframes", unit, "debufflimit", "32")
|
||||
pfUI:UpdateConfig("unitframes", unit, "debuffperrow", "8")
|
||||
pfUI:UpdateConfig("unitframes", unit, "selfdebuff", "0")
|
||||
pfUI:UpdateConfig("unitframes", unit, "invert_healthbar", "0")
|
||||
pfUI:UpdateConfig("unitframes", unit, "verticalbar", "0")
|
||||
pfUI:UpdateConfig("unitframes", unit, "buff_indicator", "0")
|
||||
|
||||
+9
-1
@@ -1513,6 +1513,7 @@ function pfUI.uf:RefreshUnit(unit, component)
|
||||
local texture, stacks, dtype
|
||||
local perrow = unit.config.debuffperrow
|
||||
local bperrow = unit.config.buffperrow
|
||||
local selfdebuff = unit.config.selfdebuff
|
||||
|
||||
local invert_h, invert_v, af
|
||||
if unit.config.debuffs == "TOPLEFT" then
|
||||
@@ -1561,6 +1562,8 @@ function pfUI.uf:RefreshUnit(unit, component)
|
||||
texture = GetPlayerBuffTexture(GetPlayerBuff(PLAYER_BUFF_START_ID+i, "HARMFUL"))
|
||||
stacks = GetPlayerBuffApplications(GetPlayerBuff(PLAYER_BUFF_START_ID+i, "HARMFUL"))
|
||||
dtype = GetPlayerBuffDispelType(GetPlayerBuff(PLAYER_BUFF_START_ID+i, "HARMFUL"))
|
||||
elseif selfdebuff == "1" then
|
||||
_, _, texture, stacks, dtype = libdebuff:UnitOwnDebuff(unitstr, i)
|
||||
else
|
||||
texture, stacks, dtype = UnitDebuff(unitstr, i)
|
||||
end
|
||||
@@ -1579,8 +1582,13 @@ function pfUI.uf:RefreshUnit(unit, component)
|
||||
if unit:GetName() == "pfPlayer" then
|
||||
local timeleft = GetPlayerBuffTimeLeft(GetPlayerBuff(PLAYER_BUFF_START_ID+unit.debuffs[i].id, "HARMFUL"),"HARMFUL")
|
||||
CooldownFrame_SetTimer(unit.debuffs[i].cd, GetTime(), timeleft, 1)
|
||||
elseif libdebuff and selfdebuff == "1" then
|
||||
local name, rank, texture, stacks, dtype, duration, timeleft, caster = libdebuff:UnitOwnDebuff(unitstr, i)
|
||||
if duration and timeleft then
|
||||
CooldownFrame_SetTimer(unit.debuffs[i].cd, GetTime() + timeleft - duration, duration, 1)
|
||||
end
|
||||
elseif libdebuff then
|
||||
local name, rank, texture, stacks, dtype, duration, timeleft = libdebuff:UnitDebuff(unitstr, i)
|
||||
local name, rank, texture, stacks, dtype, duration, timeleft, caster = libdebuff:UnitDebuff(unitstr, i)
|
||||
if duration and timeleft then
|
||||
CooldownFrame_SetTimer(unit.debuffs[i].cd, GetTime() + timeleft - duration, duration, 1)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user