From 3485ab91bee7cb0cc3afb6aa88b9a267004f69d7 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 11 Dec 2016 07:17:20 +0000 Subject: [PATCH] Fixed player attack glitch while target was moving. --- .../com/l2jmobius/gameserver/model/actor/L2Character.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java index e5ca8dc38f..c246f7e635 100644 --- a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java +++ b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/model/actor/L2Character.java @@ -3487,6 +3487,13 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe */ public void moveToLocation(int x, int y, int z, int offset) { + // Do not move while character is attacking or casting. + // Fixes player attack glitch while target is moving. + if (isAttackingNow() || isCastingNow()) + { + return; + } + // Get the Move Speed of the L2Charcater final double speed = getMoveSpeed(); if ((speed <= 0) || isMovementDisabled())