From 21b4fb77b21c7d76ed84986da26a89309a610a07 Mon Sep 17 00:00:00 2001 From: Meow <30401521+me0wg4ming@users.noreply.github.com> Date: Sun, 29 Mar 2026 21:56:00 +0200 Subject: [PATCH] fixed upper/lower case issue for macros of players (click casting) --- api/unitframes.lua | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/api/unitframes.lua b/api/unitframes.lua index 023bed43..e39d1df2 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -2716,15 +2716,17 @@ function pfUI.uf:EnableClickCast() local prefix = modifier == "" and "" or modifier .. "-" -- check for "/" in the beginning of the string, to detect macros - if string.find(pfUI_config.unitframes["clickcast"..bconf..mconf], "^%/(.+)") then + local ccval = pfUI_config.unitframes["clickcast"..bconf..mconf] + local ccval_lower = string.lower(ccval) + if string.find(ccval, "^%/(.+)") then self:SetAttribute(prefix.."type"..bid, "macro") - self:SetAttribute(prefix.."macrotext"..bid, pfUI_config.unitframes["clickcast"..bconf..mconf]) + self:SetAttribute(prefix.."macrotext"..bid, ccval) self:SetAttribute(prefix.."spell"..bid, nil) - elseif string.find(pfUI_config.unitframes["clickcast"..bconf..mconf], "^target") then + elseif string.find(ccval_lower, "^target") then self:SetAttribute(prefix.."type"..bid, "target") self:SetAttribute(prefix.."macrotext"..bid, nil) self:SetAttribute(prefix.."spell"..bid, nil) - elseif string.find(pfUI_config.unitframes["clickcast"..bconf..mconf], "^menu") then + elseif string.find(ccval_lower, "^menu") then self:SetAttribute(prefix.."type"..bid, "showmenu") self:SetAttribute(prefix.."macrotext"..bid, nil) self:SetAttribute(prefix.."spell"..bid, nil) @@ -2766,10 +2768,11 @@ function pfUI.uf:ClickAction(button) modstring = IsShiftKeyDown() and modstring.."shift" or modstring modstring = modstring..button if this.clickactions and this.clickactions[modstring] then - if string.find(this.clickactions[modstring], "^menu") then + local action_lower = string.lower(this.clickactions[modstring]) + if string.find(action_lower, "^menu") then -- show menu showmenu = true - elseif string.find(this.clickactions[modstring], "^target") then + elseif string.find(action_lower, "^target") then -- target unit showmenu = nil else