mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-30 19:19:59 +00:00
nameplates: add option to show debuff stacks
This commit is contained in:
@@ -661,6 +661,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("nameplates", "debuffs", "filter", "none")
|
||||
pfUI:UpdateConfig("nameplates", "debuffs", "whitelist", "")
|
||||
pfUI:UpdateConfig("nameplates", "debuffs", "blacklist", "")
|
||||
pfUI:UpdateConfig("nameplates", "debuffs", "showstacks", "0")
|
||||
|
||||
pfUI:UpdateConfig("abuttons", nil, "enable", "0")
|
||||
pfUI:UpdateConfig("abuttons", nil, "position", "bottom")
|
||||
|
||||
@@ -2108,6 +2108,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
CreateConfig(U["nameplates"], T["Enable Debuffs"], C.nameplates, "showdebuffs", "checkbox")
|
||||
CreateConfig(U["nameplates"], T["Estimate Debuffs"], C.nameplates, "guessdebuffs", "checkbox")
|
||||
CreateConfig(U["nameplates"], T["Debuff Icon Size"], C.nameplates, "debuffsize")
|
||||
CreateConfig(U["nameplates"], T["Show Debuff Stacks"], C.nameplates.debuffs, "showstacks", "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")
|
||||
|
||||
@@ -255,6 +255,12 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
|
||||
debuffs[i].icon:SetTexture(.3,1,.8,1)
|
||||
debuffs[i].icon:SetAllPoints(debuffs[i])
|
||||
|
||||
debuffs[i].stacks = debuffs[i]:CreateFontString(nil, "OVERLAY")
|
||||
debuffs[i].stacks:SetAllPoints(debuffs[i])
|
||||
debuffs[i].stacks:SetJustifyH("RIGHT")
|
||||
debuffs[i].stacks:SetJustifyV("BOTTOM")
|
||||
debuffs[i].stacks:SetTextColor(1,1,0)
|
||||
|
||||
debuffs[i].cd = CreateFrame(COOLDOWN_FRAME_TYPE, nil, debuffs[i], "CooldownFrameTemplate")
|
||||
debuffs[i].cd.pfCooldownType = "ALL"
|
||||
end
|
||||
@@ -371,6 +377,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
|
||||
-- update debuff positions
|
||||
local limit = floor(width / debuffsize)
|
||||
for i=1,16 do
|
||||
nameplate.debuffs[i].stacks:SetFont(font, font_size, font_style)
|
||||
nameplate.debuffs[i]:ClearAllPoints()
|
||||
if i == 1 then
|
||||
nameplate.debuffs[i]:SetPoint("TOPLEFT", nameplate.health, "BOTTOMLEFT", 0, -4)
|
||||
@@ -535,6 +542,13 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
|
||||
plate.debuffs[index].icon:SetTexture(texture)
|
||||
plate.debuffs[index].icon:SetTexCoord(.078, .92, .079, .937)
|
||||
|
||||
if stacks and stacks > 1 and C.nameplates.debuffs["showstacks"] == "1" then
|
||||
plate.debuffs[index].stacks:SetText(stacks)
|
||||
plate.debuffs[index].stacks:Show()
|
||||
else
|
||||
plate.debuffs[index].stacks:Hide()
|
||||
end
|
||||
|
||||
if duration and timeleft then
|
||||
plate.debuffs[index].cd:SetAlpha(0)
|
||||
plate.debuffs[index].cd:Show()
|
||||
|
||||
Reference in New Issue
Block a user