HerculesWS / Hercules

Hercules is a collaborative software development project revolving around the creation of a robust massively multiplayer online role playing game (MMORPG) server package. Written in C, the program is very versatile and provides NPCs, warps and modifications. The project is jointly managed by a group of volunteers located around the world as well as a tremendous community providing QA and support. Hercules is a continuation of the original Athena project.
http://herc.ws
GNU General Public License v3.0
903 stars 757 forks source link

Monsters attack after death #3208

Open AcidMarco opened 1 year ago

AcidMarco commented 1 year ago

== Describe the bug == Monsters deal 1-2 attacks after death.

== To Reproduce == Steps to reproduce the behavior:

  1. Hunt Grand Pecos or another mobs.
  2. Kill the monster with high attack speed or high damage.
  3. Move away from the monster and got hit or miss by a monster after its death.

== Expected behavior == Monster stops attacks after death.

== Video == Reproducing the issue in the video: https://www.youtube.com/watch?v=iE-iAah5sa0

== System specs (please complete the following information): ==

== Comments: == Seems the mobs which has long attack motion reproduce this issue more often. It reproduces after the mob dies, loot drops and after the chat info, that the mob has been defeated.

csnv commented 1 year ago

After some testing, I think it's a client bug rather than the emulator's, related to some mob animations.

I tried copying succubus' settings into grand peco: same movement speed, attack delay, motion, etc. While these settings work completely fine under succubus, under grand peco it works as you described.

On a more technical note, the packet is sent on a relatively predictable manner for both cases. However, while the succubus displays the attack damage after its attack animation ends, I've noticed that the damage displayed for grand peco's attack is not displayed when the attack animation ends, it occurs aprox. one second after the animation stopped, almost two seconds later than when the packet was received.

Maybe, the error in this case is the client is applying the animation time delay twice (960 x 2) for displaying damage in this case.

csnv commented 7 months ago

Confirmed, it's not a bug. You can read how to fix this client side here https://github.com/csnv/act-parser/blob/master/docs/fix-attack-delay.md