From 97d71ec36169a48ff757a81dddbdc4d58c7a13ad Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 11 Sep 2023 01:36:45 -0500 Subject: [PATCH] move to point handler revert --- .../client/handlers/MoveToPointHandler.java | 28 ++----------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/src/engine/net/client/handlers/MoveToPointHandler.java b/src/engine/net/client/handlers/MoveToPointHandler.java index 3a96dc34..c6d99f63 100644 --- a/src/engine/net/client/handlers/MoveToPointHandler.java +++ b/src/engine/net/client/handlers/MoveToPointHandler.java @@ -28,33 +28,9 @@ public class MoveToPointHandler extends AbstractClientMsgHandler { protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) throws MsgSendException { MoveToPointMsg msg = (MoveToPointMsg) baseMsg; - - PlayerCharacter pc = (origin != null) ? (origin.getPlayerCharacter()) : null; - if (pc == null) - return false; - if (msg.getInitiatedFromAttack() == 1) { - //move message was initiated by an attack message - Enum.GameObjectType combatTargetType = pc.combatTarget.getObjectType(); - if (combatTargetType.equals(Enum.GameObjectType.NPC)) { - msg.clearTarget(); - pc.setCombatTarget(null); - origin.sendMsg(msg); - } else if (combatTargetType.equals(Enum.GameObjectType.Building)) { - Building targetBuilding = BuildingManager.getBuilding(pc.combatTarget.getObjectUUID()); - if (targetBuilding != null) { - if (!targetBuilding.isVulnerable() || targetBuilding.getRank() < 0) { - msg.clearTarget(); - pc.setCombatTarget(null); - origin.sendMsg(msg); - } - } - } - msg.setEndCoord(pc.loc); - origin.sendMsg(msg); + PlayerCharacter pc = origin.getPlayerCharacter(); + if(pc == null) return true; - } - - MovementManager.movement(msg, pc); return true;