Quantcast An interesting problem has started with Legion - WoWInterface
Thread Tools Display Modes
10-22-16, 10:57 AM   #1
Terenna
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 98
An interesting problem has started with Legion

An interesting problem has started with Legion.

I have the following macro:

/use [mod:ctrl,mod:alt][mod:ctrl] 6
/cast [mod:shift,mod:alt][mod:shift] Grappling Hook
/cast [mod:alt][nomod] Sprint

Which, previously, would use my rocket boosts belt if I held down ctrl or ctrl+alt and hit r. It would cast shadowstep if I held shift or shift+alt and hit r. It would cast sprint if I had no mod or alt key mod and hit r.

I noticed today that if I hold ctrl alt and r it will use both my nitro boost and my sprint with only one key press. Further, if hold shift alt r, it will not cast grappling hook, instead casting sprint.

The singular shift and ctrl modifiers do not behave this way, and cast the correct spell, it's only when I add in the alt double modifier this issue occurs.
  Reply With Quote
10-22-16, 07:13 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
If you have any programming experience, here is how your macro would be written in Lua code:

lua Code:
  1. if ( IsControlKeyDown() and IsAltKeyDown() ) or IsControlKeyDown() then
  2.     UseInventoryItem(6)
  3. end
  4.  
  5. if ( IsShiftKeyDown() and IsAltKeyDown() ) or IsShiftKeyDown() then
  6.     UseItem("Grappling Hook")
  7. end
  8.  
  9. if IsAltKeyDown() or not IsModifierKeyDown() then
  10.    CastSpellByName("Sprint")
  11. end

As you can see, there's a lot of redundancy. If Ctrl is pressed, it should try to use both the rocket boost and Sprint. If Shift is pressed, it should try to use both the grappling hook and Sprint.

However, because a macro executes everything at the same time, once one action triggers the GCD, no further actions can succeed. Based on this, and your descriptions of how your macro used to work, and how it works now, I would assume that the rocket boost previously triggered the GCD, but now does not.

To solve this problem, you should rewrite your macro in any of these ways, ranked from best to worst:

1. Use a single statement with only the conditions you actually care about:

/use [mod:ctrl] 6; [mod: shift] Grappling Hook; Sprint
2. Use conditions that don't overlap, so no modifier combination can trigger more than one statement:

/use [mod:ctrl] 6
/cast [mod:shift] Grappling Hook
/cast [mod:alt, nomod:ctrl, nomod:shift] [nomod] Sprint
3. Use a single statement with your existing overlapping conditions; the overlap doesn't matter here because as soon as one condition matches, the rest of the statement is ignored:

/use [mod:ctrl, mod:alt] [mod:ctrl] 6; [mod:shift, mod:alt] [mod:shift] Grappling Hook; [mod:alt] [nomod] Sprint
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote
10-23-16, 09:19 AM   #3
Terenna
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 98
As always Phanx, I appreciate your effort and help throughout the years, I donated 20 dollars to my local animal shelter in your (screen)name!
  Reply With Quote
10-25-16, 04:05 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Yay for helping homeless kitties!
__________________
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » An interesting problem has started with Legion

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