mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
Fix showtooltip icon display by parsing conditionals from spell names
When #showtooltip had an argument with conditionals (e.g., #showtooltip [stance:1] Fireball), the code was trying to find a spell named "[stance:1] Fireball" which doesn't exist. This resulted in no texture being found for the tooltip action, causing incorrect icons. Now the code parses the argument first using GetParsedMsg() to extract just the spell name before creating the tooltip action info. This allows it to properly find the spell in the spellbook and retrieve its correct texture/icon.
This commit is contained in:
@@ -1041,8 +1041,10 @@ function CleveRoids.ParseMacro(name)
|
||||
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))
|
||||
-- Parse the arg to extract the spell name from any conditionals
|
||||
local parsedArg = CleveRoids.GetParsedMsg(arg)
|
||||
macro.actions.tooltip = CleveRoids.CreateActionInfo(parsedArg)
|
||||
local action = CleveRoids.CreateActionInfo(parsedArg)
|
||||
action.cmd = "/cast"
|
||||
action.args = arg
|
||||
action.isReactive = CleveRoids.reactiveSpells[action.action]
|
||||
|
||||
Reference in New Issue
Block a user