mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
fix non-letter or number characters in item or spell names
This commit is contained in:
@@ -744,7 +744,7 @@ function CleveRoids.ParseMacro(name)
|
||||
_, texture, body = GetMacroInfo(macroID)
|
||||
end
|
||||
|
||||
-- Fallback: SuperMacro “Super” tab
|
||||
-- Fallback: SuperMacro "Super" tab
|
||||
if (not body) and GetSuperMacroInfo then
|
||||
_, texture, body = GetSuperMacroInfo(name)
|
||||
end
|
||||
@@ -761,6 +761,9 @@ function CleveRoids.ParseMacro(name)
|
||||
macro.actions.list = {}
|
||||
|
||||
-- build a list of testable actions for the macro
|
||||
local hasShowTooltip = false
|
||||
local showTooltipHasArg = false
|
||||
|
||||
for i, line in ipairs(CleveRoids.splitString(body, "\n")) do
|
||||
line = CleveRoids.Trim(line)
|
||||
local cmd, args = CleveRoids.SplitCommandAndArgs(line)
|
||||
@@ -773,10 +776,13 @@ function CleveRoids.ParseMacro(name)
|
||||
if not st then
|
||||
break
|
||||
end
|
||||
|
||||
hasShowTooltip = true
|
||||
tt = CleveRoids.Trim(tt)
|
||||
|
||||
-- #showtooltip and item/spell/macro specified, only use this tooltip
|
||||
if st and tt ~= "" then
|
||||
showTooltipHasArg = true
|
||||
for _, arg in ipairs(CleveRoids.splitStringIgnoringQuotes(tt)) do
|
||||
macro.actions.tooltip = CleveRoids.CreateActionInfo(arg)
|
||||
local action = CleveRoids.CreateActionInfo(CleveRoids.GetParsedMsg(arg))
|
||||
@@ -803,6 +809,11 @@ function CleveRoids.ParseMacro(name)
|
||||
action.args = arg
|
||||
action.isReactive = CleveRoids.reactiveSpells[action.action]
|
||||
table.insert(macro.actions.list, action)
|
||||
|
||||
-- NEW FIX: If #showtooltip with no args, use first action as tooltip
|
||||
if hasShowTooltip and not showTooltipHasArg and not macro.actions.tooltip then
|
||||
macro.actions.tooltip = action
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user