diff --git a/api/config.lua b/api/config.lua index b2d3d8a6..b668ab7a 100644 --- a/api/config.lua +++ b/api/config.lua @@ -482,16 +482,19 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("castbar", "player", "height", "-1") pfUI:UpdateConfig("castbar", "player", "showicon", "0") pfUI:UpdateConfig("castbar", "player", "showlag", "0") + pfUI:UpdateConfig("castbar", "player", "showrank", "0") pfUI:UpdateConfig("castbar", "target", "hide_pfui", "0") pfUI:UpdateConfig("castbar", "target", "width", "-1") pfUI:UpdateConfig("castbar", "target", "height", "-1") pfUI:UpdateConfig("castbar", "target", "showicon", "0") pfUI:UpdateConfig("castbar", "target", "showlag", "0") + pfUI:UpdateConfig("castbar", "target", "showrank", "0") pfUI:UpdateConfig("castbar", "focus", "hide_pfui", "0") pfUI:UpdateConfig("castbar", "focus", "width", "-1") pfUI:UpdateConfig("castbar", "focus", "height", "-1") pfUI:UpdateConfig("castbar", "focus", "showicon", "0") pfUI:UpdateConfig("castbar", "focus", "showlag", "0") + pfUI:UpdateConfig("castbar", "focus", "showrank", "0") pfUI:UpdateConfig("castbar", nil, "use_unitfonts", "0") pfUI:UpdateConfig("tooltip", nil, "position", "chat") diff --git a/modules/castbar.lua b/modules/castbar.lua index 966def1f..e6aec7a2 100644 --- a/modules/castbar.lua +++ b/modules/castbar.lua @@ -101,10 +101,11 @@ pfUI:RegisterModule("castbar", "vanilla:tbc", function () this:SetAlpha(1) + local rank = this.showrank and nameSubtext and nameSubtext ~= "" and string.format(" |cffaaffcc[%s]|r", nameSubtext) or "" if this.endTime ~= endTime then this.bar:SetStatusBarColor(strsplit(",", C.appearance.castbar[(channel and "channelcolor" or "castbarcolor")])) this.bar:SetMinMaxValues(0, duration / 1000) - this.bar.left:SetText(cast) + this.bar.left:SetText(cast .. rank) this.fadeout = nil this.endTime = endTime @@ -189,6 +190,7 @@ pfUI:RegisterModule("castbar", "vanilla:tbc", function () pfUI.castbar.player = CreateCastbar("pfPlayerCastbar", UIParent, "player") pfUI.castbar.player.showicon = C.castbar.player.showicon == "1" and true or nil pfUI.castbar.player.showlag = C.castbar.player.showlag == "1" and true or nil + pfUI.castbar.player.showrank = C.castbar.player.showrank == "1" and true or nil if pfUI.uf.player then local pspace = tonumber(C.unitframes.player.pspace) @@ -213,6 +215,7 @@ pfUI:RegisterModule("castbar", "vanilla:tbc", function () pfUI.castbar.target = CreateCastbar("pfTargetCastbar", UIParent, "target") pfUI.castbar.target.showicon = C.castbar.target.showicon == "1" and true or nil pfUI.castbar.target.showlag = C.castbar.target.showlag == "1" and true or nil + pfUI.castbar.target.showrank = C.castbar.target.showrank == "1" and true or nil if pfUI.uf.target then local pspace = tonumber(C.unitframes.target.pspace) @@ -237,6 +240,7 @@ pfUI:RegisterModule("castbar", "vanilla:tbc", function () pfUI.castbar.focus = CreateCastbar("pfFocusCastbar", UIParent) pfUI.castbar.focus.showicon = C.castbar.focus.showicon == "1" and true or nil pfUI.castbar.focus.showlag = C.castbar.focus.showlag == "1" and true or nil + pfUI.castbar.focus.showrank = C.castbar.focus.showrank == "1" and true or nil local pspace = tonumber(C.unitframes.focus.pspace) local width = C.castbar.focus.width ~= "-1" and C.castbar.focus.width or pfUI.uf.focus:GetWidth() diff --git a/modules/gui.lua b/modules/gui.lua index de1702f0..1345c32f 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -1892,6 +1892,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(nil, T["Player Castbar"], nil, nil, "header") CreateConfig(nil, T["Show Spell Icon"], C.castbar.player, "showicon", "checkbox") CreateConfig(nil, T["Show Lag"], C.castbar.player, "showlag", "checkbox") + CreateConfig(nil, T["Show Rank"], C.castbar.player, "showrank", "checkbox") CreateConfig(nil, T["Castbar Width"], C.castbar.player, "width") CreateConfig(nil, T["Castbar Height"], C.castbar.player, "height") CreateConfig(nil, T["Disable Player Castbar"], C.castbar.player, "hide_pfui", "checkbox") @@ -1899,6 +1900,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(nil, T["Target Castbar"], nil, nil, "header") CreateConfig(nil, T["Show Spell Icon"], C.castbar.target, "showicon", "checkbox") CreateConfig(nil, T["Show Lag"], C.castbar.target, "showlag", "checkbox") + CreateConfig(nil, T["Show Rank"], C.castbar.target, "showrank", "checkbox") CreateConfig(nil, T["Castbar Width"], C.castbar.target, "width") CreateConfig(nil, T["Castbar Height"], C.castbar.target, "height") CreateConfig(nil, T["Disable Target Castbar"], C.castbar.target, "hide_pfui", "checkbox") @@ -1906,6 +1908,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(nil, T["Focus Castbar"], nil, nil, "header") CreateConfig(nil, T["Show Spell Icon"], C.castbar.focus, "showicon", "checkbox") CreateConfig(nil, T["Show Lag"], C.castbar.focus, "showlag", "checkbox") + CreateConfig(nil, T["Show Rank"], C.castbar.focus, "showrank", "checkbox") CreateConfig(nil, T["Castbar Width"], C.castbar.focus, "width") CreateConfig(nil, T["Castbar Height"], C.castbar.focus, "height") CreateConfig(nil, T["Disable Focus Castbar"], C.castbar.focus, "hide_pfui", "checkbox")