Jump to content

Hunter Class - Auto Shot and Attack Interrupt Issue


Recommended Posts

I have seen this issue proposed all over the forums, but have yet to see an actual fix or comment regarding a possible workaround.
Hunter's use Auto Shot as a good chunk of damage output, but WRobot likes to use "Attack" on its own, which causes conflicts,
interrupting Auto Shot. Here's a quick .gif I put together showing just the issue.
 

Spoiler

ezgif-1-170373b576.gif

Auto_Shot_Failed.png

It looks extremely bot-ish. It would be great to see some light shed on this subject.

Link to comment
Share on other sites

Looking at your code, the only thing I can think of that 'might' be causing this is your WingClip method. Like maybe it is getting actived? Maybe??!? Or, perhaps the MyTarget.GetDistance is returning less than it should be?

MyTarget.GetDistance <= 5

Can you try adding an event that catches when the Auto-Attack spell is activated? And then print out the MyTarget.GetDistance, MyTarget.Name 

Edited by Avvi
Link to comment
Share on other sites

Looking at the ability that is interrupting Auto Shot again, my thread title might be misleading. The standard "Attack" skill is the one flashing against Auto Shot in the animated .gif above.
I have the addon, "SpellID" that shows the obvious - spell ID in tooltips, and Attack is not returning any ID. I don't think I would be able to test if "Attack" is activated.

I will try and disable any close proximity melee abilities from the fight class and see what happens...

Link to comment
Share on other sites

2 minutes ago, Apexx said:

Looking at the ability that is interrupting Auto Shot again, my thread title might be misleading. The standard "Attack" skill is the one flashing against Auto Shot in the animated .gif above.
I have the addon, "SpellID" that shows the obvious - spell ID in tooltips, and Attack is not returning any ID. I don't think I would be able to test if "Attack" is activated.

I will try and disable any close proximity melee abilities from the fight class and see what happens...

Yeah, I think it's a good test - just to eliminate all possibilities. Let us know the results!

Edited by Avvi
Link to comment
Share on other sites

The spellbook shows "Auto Attack" (ID 6603), but the ability on my action bar reads, "Attack".
The addon, "SpellID" returns 6603 in the tooltip for Auto Attack, but does not return any ID for the ability, "Attack" on my action bar.
Are they the same?

Dragging the "Auto Attack" ability to my action bar, changed the name to "Attack" and does not show spell ID information.

How would you suggest testing if Auto Attack is activated?

Link to comment
Share on other sites

I think this should work:

You'll have to call watchForAutoAttack() from your initializer. Also, you may need to use UNIT_SPELLCAST_SENT instead. 

 private void watchForAutoAttack()
    {

        EventsLuaWithArgs.OnEventsLuaWithArgs += (LuaEventsId id, List<string> args) =>
        {
            if (id == wManager.Wow.Enums.LuaEventsId.UNIT_SPELLCAST_START) {
                if (args[0] == "player" && args[1] == "Auto-Attack") {
                    // log the stuffs
                }
            }

        };

    }

 

Link to comment
Share on other sites

It doesn't seem to be returning any log. I have tried changing the string from "Auto-Attack" to "Auto Attack" and just "Attack".
I have tried changing "UNIT_SPELLCAST_START" TO "UNIT_SPELLCAST_SENT".

Link to comment
Share on other sites

My mistake, the correct event is: PLAYER_ENTER_COMBAT . I forgot that Auto Attack is a different beast. The correct event is PLAYER_ENTER_COMBAT

Remove the if statement, and just print the logs like this:

 

 private void watchForAutoAttack()
    {

        EventsLuaWithArgs.OnEventsLuaWithArgs += (LuaEventsId id, List<string> args) =>
        {
            if (id == wManager.Wow.Enums.LuaEventsId.PLAYER_ENTER_COMBAT) {
                    // log the stuffs
            }

        };

    }

 

 

Edited by Avvi
Link to comment
Share on other sites

My code is working in Legion for me. This is exactly what i have: 

    private void watchForEvents()
    {

        EventsLuaWithArgs.OnEventsLuaWithArgs += (LuaEventsId id, List<string> args) =>
        {

            if (id == wManager.Wow.Enums.LuaEventsId.PLAYER_ENTER_COMBAT) {
                Logging.Write("AUTO ATTACK ENABLED.");
            }

        };

    }

 

I can spam the "Auto-Attack" button, and it spams the AUTO ATTACK ENABLED. Or, when the character enables it himself, it also logs the AUTO ATTACK ENABLED

Edited by Avvi
Link to comment
Share on other sites

Okay, here's a snapshot of the last tidbits of the log file:

19:13:52 - [BMHunter] Is initialized.
19:13:52 - [BMHunter] Is started.
[D] 19:13:52 - PetPassiveMode() Enabled
19:13:52 - [Butler] Butler version 1.3 is loaded and ready
[D] 19:13:54 - [Butler] acknowledging item "Charger's Armor" id 15479 with a value of 115
[D] 19:13:54 - [Butler] acknowledging item "Ranger's Vest" id 23266 with a value of 55
19:13:55 - [Butler] item "Charger's Armor" id 15479 blacklisted
[D] 19:13:55 - [Butler] acknowledging item "Sharp Arrow" id 2515 with a value of 5.833333
19:13:56 - [Butler] item "Sharp Arrow" id 2515 blacklisted
[D] 19:13:57 - [Butler] acknowledging item "Charger's Handwraps" id 15476 with a value of 64
[D] 19:13:57 - [Butler] acknowledging item "Embossed Leather Gloves" id 4239 with a value of 241
19:14:00 - [Fight] Player Attack Zhevra Runner (lvl 13)
[F] 19:14:00 - [Spell] Cast Hunter's Mark (Hunter's Mark)
[F] 19:14:00 - [Spell] Cast Serpent Sting (Serpent Sting)
[D] 19:14:01 - AUTO ATTACK ENABLED.
[D] 19:14:01 - Zhevra Runner GetDistance = 28.04692
[D] 19:14:02 - PetDefensiveMode() Enabled
[F] 19:14:02 - [Spell] Cast Serpent Sting (Serpent Sting)
[F] 19:14:04 - [Spell] Cast Arcane Shot (Arcane Shot)
[D] 19:14:04 - AUTO ATTACK ENABLED.
[D] 19:14:04 - Zhevra Runner GetDistance = 9.811253
[F] 19:14:06 - /castsequence !Auto Shot, !Auto Shot
[F] 19:14:07 - /castsequence !Auto Shot, !Auto Shot
[D] 19:14:07 - AUTO ATTACK ENABLED.
[D] 19:14:07 - Zhevra Runner GetDistance = 9.811253
[F] 19:14:07 - /castsequence !Auto Shot, !Auto Shot
[F] 19:14:08 - /castsequence !Auto Shot, !Auto Shot
[F] 19:14:08 - [Spell] Cast Serpent Sting (Serpent Sting)
[D] 19:14:08 - PetPassiveMode() Enabled

If it's the correct way to determine Auto Attack initiating, it would be nice to disable this feature for range classes until the target is within melee range.
I appreciate your help @Avvi

Link to comment
Share on other sites

Not sure if this will work, but try this:

 

    private void watchForEvents()
    {

        EventsLuaWithArgs.OnEventsLuaWithArgs += (LuaEventsId id, List<string> args) =>
        {

            if (id == wManager.Wow.Enums.LuaEventsId.PLAYER_ENTER_COMBAT) {
                Logging.Write("AUTO ATTACK ENABLED.");
           	wManager.Wow.Helpers.Lua.RunMacroText("/stopattack");
          	Logging.Write("AUTO ATTACK DISABLED.");
              Methods.RunMacro("/cast Auto Shot", Me.InCombat);
            }

        };

    }

 

I expect it to stop the auto attack. You may need to call another one of  your methods to restart your rotation. Not sure how exactly it will behave once you stop the auto attack. Also, please note that this is a workaround, and doesn't really solve the problem. It would be interesting to determine what causes it to start the auto attack in the first place. 

 

Edited by Avvi
Link to comment
Share on other sites

I believe the main issue is that once it initiates Auto Attack it interrupts Auto Shot. My character will shoot range just fine, then pull out the weapon
and get ready for melee attack even though the target unit is still 30 yards out. :unsure:

Link to comment
Share on other sites

Another thing you might be able to try..

            if (id == wManager.Wow.Enums.LuaEventsId.UNIT_SPELLCAST_INTERRUPTED)
            {
                if (args[0] == "player" && args[1] == "Auto Shot") {
                  wManager.Wow.Helpers.Lua.RunMacroText("/stopattack");
                  Methods.RunMacro("/cast Auto Shot", Me.InCombat);
                }
            }

 

Link to comment
Share on other sites

Just now, Apexx said:

It does not look nearly as bad, but it is a bit of an issue in my honest opinion. Thanks again @Avvi

Definitely. I agree, there is an issue here that I hope @Droidz can/will address. It has to be something in the WRotation code that is triggering Auto Attack.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...