WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   toggle aura with a custom SecureActionButtonTemplate button (like Stancebar) (https://www.wowinterface.com/forums/showthread.php?t=49607)

sezz 08-09-14 04:49 AM

toggle aura with a custom SecureActionButtonTemplate button (like Stancebar)
 
i want to recreate the hunter aspect bar for wod using custom buttons based on SecureActionButtonTemplate

currently i'm using this to cast a spell on left click and cancel the aura on rightclick:

Lua Code:
  1. button:SetAttribute("type", "spell");
  2. button:SetAttribute("spell", spellId);
  3. button:SetAttribute("type2", "cancelaura");
  4. button:SetAttribute("unit2", "player");
  5. button:SetAttribute("spell2", spellName);
  6. button:RegisterForClicks("AnyUp");

is there a way to change the behavior of my buttons to act more like the real stancebar, that means left click should cancel the aura if it is already active and casts it if not?

Duugu 08-09-14 09:39 AM

I would say 'no'. Except you could rewrite the buttons attributes to cancleaura if the player casts the aura and vice vesa. But this is resticted to out of combat. :/

[e] Maybe there is a kind of macro that works this way? I'm not that familar with macros.

Seerah 08-09-14 12:46 PM

Check this out: http://www.wowinterface.com/download...ellToggle.html

semlar 08-09-14 02:24 PM

I'm not sure I understand the question, if you try and cast an active aspect again on the beta it cancels itself.

You shouldn't need to handle canceling the aura at all.

sezz 08-10-14 05:07 AM

Quote:

Originally Posted by Seerah (Post 295100)

Thanks, Spell Toggle is using the spell name for the spell attribute (I was using the spell ID).

When I change the spell ID to the spell name it works as expected :)


All times are GMT -6. The time now is 10:25 AM.

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