Quantcast Cannot Emulate @cursor with a Secure Button - WoWInterface
Thread Tools Display Modes
09-28-18, 07:20 AM   #1
Vrul
A Rage Talon Dragon Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 312
Cannot Emulate @cursor with a Secure Button

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.

Last edited by Vrul : 09-28-18 at 11:54 AM. Reason: More info
  Reply With Quote

WoWInterface » PTR » PTR UI Bugs » Cannot Emulate @cursor with a Secure Button

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off