WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   PTR UI Bugs (https://www.wowinterface.com/forums/forumdisplay.php?f=176)
-   -   Cannot Emulate @cursor with a Secure Button (https://www.wowinterface.com/forums/showthread.php?t=56722)

Vrul 09-28-18 07:20 AM

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.


All times are GMT -6. The time now is 07:24 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI