fixed upper/lower case issue for macros of players (click casting)

This commit is contained in:
Meow
2026-03-29 21:56:00 +02:00
parent 5be9b00623
commit 21b4fb77b2
+9 -6
View File
@@ -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