The following Shaman macro works fine:
Code:
#showtooltip Earthquake
/cast [@cursor] Earthquake
However, it cannot be reproduced using a secure button by setting the 'unit' attribute due to the following code in SecureTemplates.lua function SecureActionButton_OnClick:
Code:
-- Don't do anything if our unit doesn't exist
if ( unit and unit ~= "none" and not UnitExists(unit) ) then
return;
end
Which can be fixed with the following change (or something similar):
Code:
-- Don't do anything if our unit doesn't exist
if ( unit and unit ~= "none" and unit ~= "cursor" and not UnitExists(unit) ) then
return;
end
Edit:
UseAction doesn't work with the unit 'player' for ground targeted actions whereas CastSpellByID and CastSpellByName do. I could not test the unit 'cursor' for all three due to the above mentioned issue. All three should be made consistent with each other and have the same behavior attainable via a macro.
I tried to test with items but only had the toys Puntable Marmot and Shushen's Spittoon and neither worked with @cursor or @player in a macro. I'm not sure if that is a toy issue or just item's in general.