#386 Auto Shot gets cancelled when quickly switching targets

Status: Awaiting review · Area: Classes & Specs · Hunter

Quickly switching targets after starting Auto Shot sometimes cancels it for the new target.

Current behavior

When Auto Shot is activated and you quickly switch to another target, Auto Shot fires at the original target but gets cancelled for the new target. This can happen when switching targets using either Tab targeting or left-clicking. The issue is inconsistent and does not happen every time, but switching targets as quickly as possible after activating Auto Shot seems to make it reproducible.

Expected behavior

Switching to another target within Auto Shot range should not cause Auto Shot to be unexpectedly cancelled or trigger an unintended switch to melee attacks. Auto Shot should behave correctly when switching between valid targets, without requiring the player to reactivate it manually.

How to reproduce

1. Target an enemy within Auto Shot range.
2. Activate Auto Shot.
3. Immediately switch to another enemy within Auto Shot range, as quickly as possible, using either Tab targeting or left-clicking.
4. Observe that Auto Shot fires at the original target, but when switching to the second target, the game unexpectedly switches to melee attacks, cancelling Auto Shot.

Note: This bug is intermittent and may not occur on every attempt.