Open mbattersby opened 8 months ago
Test case is simple (compare 10.1.7 live versus 10.2 xptr).
/dump GetActionInfo(1)
Same issue exists if instead of a slot in (1) you put an item name.
For my addon I am trying to save the action bars, so I need the actual Macro, but I found that if it's a macro I can use GetActionText(slot) to get the Macro Name and pass that to GetMacroInfo(Macro Name) as a work around (not sure what happens if there are 2 macros with same name).
actionType, id, subType = GetActionInfo(actionID)
has been changed in 10.2 to return subType when actionType == "macro" and id information for that subType. Previous behaviour was actionType == "macro" would return macroID in id and subType was nil.
This works well for
type == "macro" and subType == "spell"
, returning the spell ID in id and saving a call to GetMacroSpell.However for
type == "macro" and subType == "item"
it is [edit] always returningactionID-1
in the id field, instead of what I believe should be the itemID.[Edit: previous workaround info was wrong.]
You can get the spell ID if the item casts a spell like the below, but there's no way to get the itemID as neither the itemID nor the macroID are available.
Edit: I don't think the above reliably works, the spell it returns is not always the same as GetItemSpell.