From 86fb0254e6f43de87d01c96c4d81b72f466c4288 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Tue, 30 Jun 2026 12:34:34 -0500 Subject: [PATCH] Show autoattack icon and glow --- Core.lua | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/Core.lua b/Core.lua index 7bd336c..625bbac 100644 --- a/Core.lua +++ b/Core.lua @@ -4656,6 +4656,10 @@ function IsCurrentAction(slot) else local name if actionToCheck.spell then + if CleveRoids.IsAutoAttackSpell(actionToCheck.spell) then + return CleveRoids.CurrentSpell.autoAttack and 1 or nil + end + local rank = actionToCheck.spell.rank or actionToCheck.spell.highest.rank name = actionToCheck.spell.name..(rank and ("("..rank..")")) @@ -4698,9 +4702,6 @@ function IsCurrentAction(slot) end end --- Macro icon for an action slot, via ClassicAPI's GetActionInfo (macro slot --- directly, no GetActionText -> GetMacroIndexByName name round-trip). --- Returns the macro texture, or nil if the slot isn't a macro / has no icon. local function GetSlotMacroTexture(slot) local kind, macroId = CleveRoids.ClassicAPI.GetActionInfo(slot) if kind == "macro" and macroId then @@ -4710,6 +4711,18 @@ local function GetSlotMacroTexture(slot) return nil end +local function IsAutoAttackSpell(spell) + if not spell then return false end + if C_Spell and C_Spell.IsAutoAttackSpell and spell.id then + return C_Spell.IsAutoAttackSpell(spell.id) + end + if C_SpellBook and C_SpellBook.IsAutoAttackSpellBookItem and spell.spellSlot then + return C_SpellBook.IsAutoAttackSpellBookItem(spell.spellSlot, spell.bookType) + end + return false +end +CleveRoids.IsAutoAttackSpell = IsAutoAttackSpell + CleveRoids.Hooks.GetActionTexture = GetActionTexture function GetActionTexture(slot) if not slot then return nil end @@ -4798,6 +4811,13 @@ function GetActionTexture(slot) end end + if a and a.spell and CleveRoids.IsAutoAttackSpell(a.spell) then + local mainHandTexture = GetInventoryItemTexture("player", 16) + if mainHandTexture then + texture = mainHandTexture + end + end + if texture then return texture end