8000
Set off-hand attack speed for mobs to the same speed as main hand, and delay off-hand attack by half of the speed instead of the full speed #482
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🍰 Pullrequest
This is something I noticed while testing other things, but the sniffer and parser aren't updated yet so I had to get a bit creative. Please bear with me.
This PR fixes two bugs:
I needed a way to measure it as precisely as possible. Enter 120 fps videos and Avidemux (video player that shows the frame time in milliseconds).
First example: 2.4 speed MH, 2.5 speed OH
1.-.2.4-2.5.2022-03-05.01-16-55.mp4
00:00:08:066: MH attack
00:00:09:316: OH attack
00:00:10:466: MH attack
OH attack happens 1250 ms after MH attack. 1250 * 2 = 2500 ms.
Second example: 1.6 speed MH, 1.8 speed OH
2.-.1.6-1.8.2022-03-05.01-16-20.mp4
00:00:06:491: MH attack
00:00:07:358: OH attack
00:00:08:091: MH attack
OH attack happens 867 ms after MH attack. 867 * 2 = 1734 ms (consider that this method of measuring can have an error of a few milliseconds).
Third example: 1.6 speed MH, 2.5 speed OH
3.-.1.6-2.5.2022-03-05.01-15-38.mp4
00:00:09:125: MH attack
00:00:10:375: OH attack
00:00:10:725: MH attack
OH attack happens 1250 ms after MH attack. 1250 * 2 = 2500 ms.
In all three cases, the OH attack happens exactly (OH weapon speed / 2) milliseconds after the main hand attack.
Now for the case that concerns mobs (MeleeBaseAttackTime = 2000 for this specific mob):
4.-.Mob.2022-03-05.01-35-02.mp4
00:00:06:450: MH attack
00:00:07:433: OH attack
00:00:08:450: MH attack
00:00:09:450: OH attack
00:00:10:466: MH attack
Ignore the Backstabs, I had to avoid parries because they increase the attacker's attack speed.
OH attack happens 983 ms after MH attack. 983 * 2 = 1966 ms.
In this case, the mob has attack speed = 2 seconds. The offhand attack happens one second after the main hand attack.
And, related to the second fix, notice how the offhand attacks happens exactly 2 seconds after the previous one. So it's not reduced to 1500 ms speed like the current code does.
Compare it to the current CMaNGOS behavior:
5.-.CMaNGOS.Unfixed.Mob.2022-03-05.01-44-11.mp4
00:00:05:925: MH attack
00:00:07:325: OH attack
00:00:07:975: MH attack
00:00:08:858: OH attack
OH attack happens 1400 ms after MH attack. The delay between each OH attack is 1533 ms. Wrong on both accounts compared to retail.
And something that's not covered by this PR but have been wondering about: on retail, if you right-click a mob from far away, you get an "out of range" error. Then, if you get closer to the mob, you attack with both MH and OH instantly.
6.-.2.4-2.5.too.far.away.mp4
On CMaNGOS Classic you get no errors when you right-click a mob from far away, so this behavior does not happen. You do get errors when you turn around to face your back to the mob (you get a "wrong facing" error"), and when you turn back you correctly attack the mob with both weapons instantly. I was wondering if you should get errors and attack timing set to 100 when right-clicking a mob from far away in 1.12.1, because the character just staying there and without errors seems strange to me.
This could seem like a nitpick, but it's a big deal for any dual-wielding class.
Proof
Issues
How2Test