ClassicWoWCommunity / cata-classic-bugs

This is a place for Cataclysm & Wrath of the Lich King Classic bug reports and research
65 stars 6 forks source link

[BUG] 100ms delay on entering stealth #339

Open caccavale opened 2 years ago

caccavale commented 2 years ago

1. Current Behavior

1.1. Description

There exists an 100ms delay when entering stealth The GetShapeshiftForm() API returns as form: 1 which is correct, but IsStealthed() returns as false. This causes issues where you cannot "batch" spells when entering stealth or using vanish. Because of the 100ms delay where the isStealthed() api still returns false this macro will use backstab instead of ambush. Even swapping conditionals to using form or bonusbar, which supposedly use a different API, will not fix the problem. In fact the following could be considered a bug on its own. Using a conditional such as stance:1 which returns as true, while stealth returns as false, will still fire off backstab while the conditionals stance/form/bonusbar shouldnt allow that.

The solution would be to either fix the delay and/or to fix the conditionals from preventing using an ability when the macro conditional is false.

1.2. How to Reproduce

/cast Vanish 
/cast [nostealth] Backstab
/cast [stealth] Ambush

Here is an example of vanishing and pressing a macro with

/cast [stance:0] Backstab 
/cast [stance:1] Ambush

unknown

As you see in the picture I did not include Vanish in the macro or the timestamps would be identical.

1.3 Source Material

{Video, Posts, etc..}

2. Expected Behavior

2.1. Description

{Describe how that mechanic/spell/npc should be working, in detail}

2.2 Source Material

{Video, Posts, etc..}

ex-#336

XyzKangUI commented 2 years ago

To clarify this bug better, the issue does not happen with the "stealth" spell. Stealth itself has some sort of "gcd" mechanism built-in where spells cannot batch unlike vanish. Keep in mind both have 0s GCD, so I don't know the technical details on why stealth does have a mechanism that prevents spells from being used for a slight decisecond or two.

As I said the issue happends mainly with Vanish (probably also shadow dance now that im thinking about it) simply because IsStealthed() is not returned as true on vanishing, while GetShapeShiftForm() does register the new state.

So a macro like this will trigger backstab when pressing it too fast after vanishing. Same thing also happends without a macro, e.g. by having Backstab and Ambush both keybound to "1".

The macro: /cast [nostance] Backstab /cast [stance:1/2] Ambush

It is hard to find any sources from 2008-2010 on this issue, because people were not discussing this issue as much back then. People were talking about some sort of "bar lag" they called it and then they started to add [stance] conditionals to their macro's so that they could "eliminate" their bar lag issue where they would use an unwanted ability. I guess the bar lag they discussed was mainly due to the 400ms batch window + server/client latency, because as you see HasBonusActionBar() returns as true when Backstab was used. This means that bonusbar:1 was active at the time of using backstab.

Now the issue is that backstab was fired because the isStealthed boolean is not met. It is arguable that you would call this server+client latency, but that does not explain how GetShapeshiftForm() would be fast enough. So the only conclusion is that the API responsible for IsStealthed has some sort of delay, less priority etc.

Also it does not explain how GetShapeshiftForm() when true does not prevent from an ability being used that requires the conditional to be true/false. E.g. the above posted macro should mean that when GetShapeshiftForm() = true that Backstab could never be casted in the first place. A post I found that dates from a later expansion clarifies that patch 6.1 "broke" the stance conditional. Here is a comment that before patch 6.1 the conditional [stance] was working fine. The conditional is obviously not totally broken, although it does not what its supposed to do in this certain scenario.

Im going back to looking for a needle in a haystack.

simonizeshow commented 2 years ago

I'm not sure if its related to this issue but maybe it is -

I have Stealth bound to the same key both on my regular bar and my stealth bar. No matter how quickly I mash that key, there is always a delay between entering stealth and exiting stealth. I'm not sure exactly how long but it was definitely long enough to be noticeable. This was annoying because all I really wanted to do was trigger my Overkill talent buff and then continue moving at full speed instead of stupid slow stealth speed.

The workaround I came up with was to replace my Stealth key with a macro

/cancelaura Stealth /cast Stealth

and then a single-tap of this macro would enter stealth normally, and a double-tap would enter and exit stealth as fast as I could press the button without any delay.

XyzKangUI commented 2 years ago

It seems that you can practically do instant attacks upon entering stealth now. It almost is as fast as using shadow dance. Huge accomplishment!

Stealth

The only issue remaining is when you vanish that the registering of the stance does not seem as fast as using stealth or shadow dance. The game simply tells you that the stealth ability you want to use next requires stealth when you vanished. This same behaviour makes the game believe that the stance swap has not occured yet, thus creating a slight margin of error where you can use backstab instead of ambush when pressing it too fast after pressing vanish.