mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
Fix showtooltip icon fallback to use tooltip texture before question mark
When #showtooltip is used without an explicit spell/item argument and all conditionals fail, the icon now falls back to the tooltip texture (first action) instead of immediately showing a question mark. This prevents the question mark icon from appearing when the macro has valid actions but none of their conditions are currently met. Fixes issue where macro icon becomes question mark when no target and Battle Shout buff is already active.
This commit is contained in:
@@ -2422,6 +2422,12 @@ function GetActionTexture(slot)
|
||||
-- This block handles the case where all conditionals fail and no explicit
|
||||
-- #showtooltip was set. It defaults to the macro's chosen icon (e.g., the red '?')
|
||||
if not actions.active and not actions.explicitTooltip and actions.list and table.getn(actions.list) > 0 then
|
||||
-- First try to use the tooltip texture if it exists
|
||||
if actions.tooltip and actions.tooltip.texture then
|
||||
return actions.tooltip.texture
|
||||
end
|
||||
|
||||
-- Then try to get the macro's own icon
|
||||
local macroName = GetActionText(slot)
|
||||
if macroName then
|
||||
local macroID = GetMacroIndexByName(macroName)
|
||||
|
||||
Reference in New Issue
Block a user