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 by Nytanath · Pull Request #482 · cmangos/mangos-classic · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2022

Conversation

Nytanath
Copy link
Contributor
@Nytanath Nytanath commented Mar 5, 2022

🍰 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:

  • When you start attacking a mob while close to it (so that no attack errors like "out of range" are triggered) and for creatures, the off hand attack is delayed by half its own attack speed, not by the full attack speed.
  • Mobs do not do off hand attacks 1/4 faster than main hand attacks.

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

  • Linked above.

Issues

  • None

How2Test

  • Attack a mob while dual-wielding, preferably with a way to measure the timing with milliseconds precision.

…d delay off-hand attack by half of the speed instead of the full speed.
@killerwife
Copy link
Contributor

Have you by any chance checked how TC and vmangos have this? Cos this is one of those cases where I kinda would notify them.

@killerwife killerwife merged commit 9739b75 into cmangos:master Mar 13, 2022
@Nytanath
Copy link
Contributor Author
Nytanath commented Mar 13, 2022

Sorry, I didn't see your post before now. I just checked TC and they have this implementation (attack speed not hastened by 1/4, off hand delayed by 50%).

Thinking of it, I should start checking other cores' implementations before going gunho on researching things.

@Nytanath Nytanath deleted the offhand_speed branch March 13, 2022 15:20
@killerwife
Copy link
Contributor

Alrdy checked myself, not to worry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0