Skip to content

Fix: CDM keybind missing for macros using equip-slot shorthand (/use 13) - #2067

Open
svart2521 wants to merge 1 commit into
EllesmereGaming:mainfrom
svart2521:cdm-macro-hotkey-missing-with-equipslot-trinket
Open

Fix: CDM keybind missing for macros using equip-slot shorthand (/use 13)#2067
svart2521 wants to merge 1 commit into
EllesmereGaming:mainfrom
svart2521:cdm-macro-hotkey-missing-with-equipslot-trinket

Conversation

@svart2521

Copy link
Copy Markdown
Contributor

Bug: https://discord.com/channels/585577383847788554/1540449760836853940

A macro using the equip-slot shorthand for a trinket (#showtooltip 13, /use 13) never shows its keybind on the CDM icon, while the same macro written with the item's full name (#showtooltip/#use Item Name) works.

Issue:

_ResolveSlotBinding's macro branch only special-cased Blizzard's "smart" single-SPELL macro resolution (subType == "spell", where GetActionInfo's id is authoritatively the spellID). It had no equivalent case for Blizzard's single-ITEM resolution (subType == "item"), even though this exact subType is already handled elsewhere in the codebase (ActionBars.lua, CdmHooks.lua's SlotSpellID) as a real, distinct return value. Without that branch, an equip-slot macro fell through entirely to the macro-name/body- scan path with no direct answer available from Blizzard itself.

Fix:

Added an elseif subType == "item" branch mirroring the existing spell one: register the keybind under -id (the actual itemID Blizzard already resolved), then fall through to the body scan in stable mode same as the spell case.

Bug:

A macro using the equip-slot shorthand for a trinket (#showtooltip 13,
/use 13) never shows its keybind on the CDM icon, while the same macro
written with the item's full name (#showtooltip/#use Item Name) works.

Issue:

_ResolveSlotBinding's macro branch only special-cased Blizzard's "smart"
single-SPELL macro resolution (subType == "spell", where GetActionInfo's
id is authoritatively the spellID). It had no equivalent case for
Blizzard's single-ITEM resolution (subType == "item"), even though this
exact subType is already handled elsewhere in the codebase (ActionBars.lua,
CdmHooks.lua's SlotSpellID) as a real, distinct return value. Without that
branch, an equip-slot macro fell through entirely to the macro-name/body-
scan path with no direct answer available from Blizzard itself.

Fix:

Added an elseif subType == "item" branch mirroring the existing spell one:
register the keybind under -id (the actual itemID Blizzard already
resolved), then fall through to the body scan in stable mode same as the
spell case. Compiles clean (luac5.1 -p).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant