This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Since the latest update of LibActionButton to 153, GetSpellId no longer works with macros.
Apologies, this is going to be a bit technical. But by the end of this issue, you will have everything needed to understand what happens. Plus, you'll have a fix which is more elegant and faster than current code.
Easy steps to reproduce the issue
With Bartender 4.17.7 it displays the spell ID of Frostbolt.
With Bartender 4.17.8 it displays "empty result", which means nil in Lua.
LibActionButton was recently updated from 151 to 153. The code of Action.GetSpellId has changed from
Action.GetSpellId = function(self) local actionType, id, subType = GetActionInfo(self._state_action) if actionType == "spell" then return id elseif actionType == "macro" then if subType == "spell" then return id else return (GetMacroSpell(id)) end endend
to
Action.GetSpellId = function(self)
local actionType, id, subType = GetActionInfo(self._state_action) if actionType == "spell" then return id elseif actionType == "macro" then if subType == "spell" then return id elseif subType == "item" then return nil -- item macros seems to return bogus values we can't support else return nil -- what else is there? spell id is only used for highlights and cast bars end end
endend
In other words, LAB now inspects subType, the 3rd value of GetActionInfo.
The problem is, subType is unreliable on WoW Classic.
For example if you bind a spell macro to BT4Button1, simply run this script:
/dump GetActionInfo(BT4Button1._state_action)
This returns a subType in Retail. This does returns a nil subType on Classic (tested with Era, TBC Anniversary, and MoP).
First of all, it's most likely a bug from the game client. So in a way, Bartender did not really break anything.
However, there is no official source that states that subType is supposed to be "spell". It looks like an ad hoc deduction, not a true specification.
I see 2 ways to fix it:
I recommend the second option, because (i) I assume GetMacroSpell was removed for a reason, and (ii) C_ActionBar is the new official tool for dealing with action bars.
Plus, GetSpellId would be much simpler
return C_ActionBar.GetSpell(self._state_action)end
The one caveat is that it requires that the game client supports C_ActionBar.GetSpell. Fortunately, all Live versions of the game client seem to support it as of today (July 27th, 2026).
To post a comment, please login or register a new account.