From a798e67b7f88746024e5cbb3e25e3915f5f105b8 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Thu, 30 Jul 2026 02:39:56 -0500 Subject: [PATCH] Use GetStringColor for buffbar color parsing Route the three buffbar color config splits through GetStringColor (cached) instead of bare strsplit. GetStringColor returns strings, so this is behavior-preserving -- including the bordercolor ~= "0" check in CreateBuffBarFrame -- and just adds the shared color cache and consistency with the rest of the codebase. --- modules/buffwatch.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/buffwatch.lua b/modules/buffwatch.lua index d22523a4..7b237c9f 100644 --- a/modules/buffwatch.lua +++ b/modules/buffwatch.lua @@ -419,9 +419,9 @@ pfUI:RegisterModule("buffwatch", function () if pfUI.uf.player and C.buffbar.pbuff.enable == "1" then pfUI.uf.player.buffbar = CreateBuffBarFrame("Player", "HELPFUL") local config = C.buffbar.pbuff - local r, g, b, a = strsplit(",", config.color) - local br, bg, bb, ba = strsplit(",", config.bordercolor) - local tr, tg, tb, ta = strsplit(",", config.textcolor) + local r, g, b, a = GetStringColor(config.color) + local br, bg, bb, ba = GetStringColor(config.bordercolor) + local tr, tg, tb, ta = GetStringColor(config.textcolor) pfUI.uf.player.buffbar:SetWidth(config.width == "-1" and pfUI.uf.player:GetWidth() or config.width) pfUI.uf.player.buffbar:SetHeight(config.height) @@ -445,9 +445,9 @@ pfUI:RegisterModule("buffwatch", function () -- create player debuffbars if pfUI.uf.player and C.buffbar.pdebuff.enable == "1" then local config = C.buffbar.pdebuff - local r, g, b, a = strsplit(",", config.color) - local br, bg, bb, ba = strsplit(",", config.bordercolor) - local tr, tg, tb, ta = strsplit(",", config.textcolor) + local r, g, b, a = GetStringColor(config.color) + local br, bg, bb, ba = GetStringColor(config.bordercolor) + local tr, tg, tb, ta = GetStringColor(config.textcolor) pfUI.uf.player.debuffbar = CreateBuffBarFrame("Player", "HARMFUL") pfUI.uf.player.debuffbar:SetWidth(config.width == "-1" and pfUI.uf.player:GetWidth() or config.width) @@ -473,9 +473,9 @@ pfUI:RegisterModule("buffwatch", function () -- create target debuffbars if pfUI.uf.target and C.buffbar.tdebuff.enable == "1" then local config = C.buffbar.tdebuff - local r, g, b, a = strsplit(",", config.color) - local br, bg, bb, ba = strsplit(",", config.bordercolor) - local tr, tg, tb, ta = strsplit(",", config.textcolor) + local r, g, b, a = GetStringColor(config.color) + local br, bg, bb, ba = GetStringColor(config.bordercolor) + local tr, tg, tb, ta = GetStringColor(config.textcolor) pfUI.uf.target.debuffbar = CreateBuffBarFrame("Target", "HARMFUL") pfUI.uf.target.debuffbar:SetWidth(config.width == "-1" and pfUI.uf.target:GetWidth() or config.width)