Skip to content

Shortcut (!) causes conditional to fail. #33

@josh-sachs

Description

@josh-sachs

Apologies in advance -This is difficult for me to articulate, but I think may be somewhat easy to fix.

Consider the following macro:

#showtooltip
/cast [inrange] !Auto Shot; !Attack

IIUC, I'd expect the icon for this macro to be for Auto Shot when within 8-35yds, otherwise it should be for basic melee attack.

This expectation is met correctly when Auto Shot is not currently auto-repeating.

As soon as Auto Shot starts repeating however, the condition starts failing and the icon will be for basic Attack - even though I'm still in range for Auto Shot. Furthermore, once Attack starts auto repeating, that portion fails and there is no fall-through (so the icon goes disabled)

I believe this is because the ! shortcut is being applied as a conditional... along the lines of

/cast [inrange,noautorepeat] Auto Shot; [noautorepeat] Attack

This is a bit counter intuitive IMO because, as originally written ! isn't expressing a conditional - it's expressing an intention to no-op on Auto Shot if the conditional [inrange] is true.

Ideally, the ! operator would flag the statement as a no-op returning true instead of appending itself to the chain of conditionals for that part of the statement.

I think a better implementation would have /cast [inrange] !Auto Shot unroll to something along the lines of (pseudo-code):

#showtooltip
`/cast [inrange] if (IsAutoRepeatAction("Auto Shot")) then NoOpReturnTrue() else CastSkillByName("Auto Shot") end; `

the conditional check for this line should ideally always match successfully regardless of auto-repeat state on Auto Shot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions