From 8c6b166a42dad3c0d57771c93f921284c4812611 Mon Sep 17 00:00:00 2001 From: FlourishingWorld <31504849+FlourishingWorld@users.noreply.github.com> Date: Wed, 19 Apr 2023 03:19:34 +0800 Subject: [PATCH] fix co-op mode avatar animation interrupt (#2124) --- .../server/packet/recv/HandlerCombatInvocationsNotify.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerCombatInvocationsNotify.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerCombatInvocationsNotify.java index 80dcf9849..d5b66d63f 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerCombatInvocationsNotify.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerCombatInvocationsNotify.java @@ -89,8 +89,8 @@ public class HandlerCombatInvocationsNotify extends PacketHandler { } } - // MOTION_STATE_NOTIFY = Dont send to other players - if (motionState == MotionState.MOTION_STATE_NOTIFY) { + // as long as one of these two packets be forwarded to client, the animation of avatar will be interrupted + if (motionState == MotionState.MOTION_STATE_NOTIFY || motionState == MotionState.MOTION_STATE_FIGHT) { continue; } } @@ -146,7 +146,7 @@ public class HandlerCombatInvocationsNotify extends PacketHandler { } if (damageFactor > 0) { Grasscutter.getLogger().debug(currentHP + "/" + maxHP + "\tLandingSpeed: " + cachedLandingSpeed + - "\tDamageFactor: " + damageFactor + "\tDamage: " + damage + "\tNewHP: " + newHP); + "\tDamageFactor: " + damageFactor + "\tDamage: " + damage + "\tNewHP: " + newHP); } else { Grasscutter.getLogger().trace(currentHP + "/" + maxHP + "\tLandingSpeed: 0\tNo damage"); }