Apexx 60 Posted September 20, 2017 Share Posted September 20, 2017 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 It looks extremely bot-ish. It would be great to see some light shed on this subject. Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/ Share on other sites More sharing options...
Droidz 2738 Posted September 22, 2017 Share Posted September 22, 2017 Hello, can you share fightclass (sample) with this problem Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32435 Share on other sites More sharing options...
Apexx 60 Posted September 22, 2017 Author Share Posted September 22, 2017 https://www.dropbox.com/s/awc728bw2b569y8/BMHunter.cs?dl=0 Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32447 Share on other sites More sharing options...
Droidz 2738 Posted September 23, 2017 Share Posted September 23, 2017 Can you check if you have activated option "auto attack/auto shot", if no activate this option and tell me if this resolve your problem Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32473 Share on other sites More sharing options...
Apexx 60 Posted September 23, 2017 Author Share Posted September 23, 2017 Still unresolved. Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32475 Share on other sites More sharing options...
Avvi 98 Posted September 23, 2017 Share Posted September 23, 2017 (edited) 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 September 23, 2017 by Avvi Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32479 Share on other sites More sharing options...
Apexx 60 Posted September 23, 2017 Author Share Posted September 23, 2017 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 https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32492 Share on other sites More sharing options...
Avvi 98 Posted September 23, 2017 Share Posted September 23, 2017 (edited) 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 September 23, 2017 by Avvi Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32495 Share on other sites More sharing options...
Apexx 60 Posted September 23, 2017 Author Share Posted September 23, 2017 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 https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32499 Share on other sites More sharing options...
Avvi 98 Posted September 23, 2017 Share Posted September 23, 2017 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 https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32501 Share on other sites More sharing options...
Apexx 60 Posted September 23, 2017 Author Share Posted September 23, 2017 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 https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32503 Share on other sites More sharing options...
Avvi 98 Posted September 23, 2017 Share Posted September 23, 2017 (edited) 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 September 23, 2017 by Avvi Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32504 Share on other sites More sharing options...
Apexx 60 Posted September 23, 2017 Author Share Posted September 23, 2017 Still nothing. Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32505 Share on other sites More sharing options...
Avvi 98 Posted September 23, 2017 Share Posted September 23, 2017 Did you add watchForAutoAttack() To your Initialize() ? Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32506 Share on other sites More sharing options...
Apexx 60 Posted September 23, 2017 Author Share Posted September 23, 2017 Yes I did. Avvi 1 Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32514 Share on other sites More sharing options...
Avvi 98 Posted September 24, 2017 Share Posted September 24, 2017 (edited) 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 September 24, 2017 by Avvi Apexx 1 Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32517 Share on other sites More sharing options...
Apexx 60 Posted September 24, 2017 Author Share Posted September 24, 2017 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 https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32518 Share on other sites More sharing options...
Avvi 98 Posted September 24, 2017 Share Posted September 24, 2017 (edited) 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 September 24, 2017 by Avvi Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32519 Share on other sites More sharing options...
Apexx 60 Posted September 24, 2017 Author Share Posted September 24, 2017 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. Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32520 Share on other sites More sharing options...
Avvi 98 Posted September 24, 2017 Share Posted September 24, 2017 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 https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32521 Share on other sites More sharing options...
Apexx 60 Posted September 24, 2017 Author Share Posted September 24, 2017 Yeah I have done that for now. hah! Avvi 1 Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32522 Share on other sites More sharing options...
Avvi 98 Posted September 24, 2017 Share Posted September 24, 2017 1 minute ago, Apexx said: Yeah I have done that for now. hah! Sweet. I'm glad we found a workaround for this! Apexx 1 Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32523 Share on other sites More sharing options...
Apexx 60 Posted September 24, 2017 Author Share Posted September 24, 2017 It does not look nearly as bad, but it is a bit of an issue in my honest opinion. Thanks again @Avvi Avvi 1 Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32524 Share on other sites More sharing options...
Avvi 98 Posted September 24, 2017 Share Posted September 24, 2017 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 https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32525 Share on other sites More sharing options...
Apexx 60 Posted September 24, 2017 Author Share Posted September 24, 2017 Beast Mastery Fight Class Template [Derived from How to create an Fight Class (developer only)] Beast Mastery Hunter Fight Class It's probably not optimized, because I slapped it together quickly. Link to comment https://wrobot.eu/forums/topic/7143-hunter-class-auto-shot-and-attack-interrupt-issue/#findComment-32526 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now