From 13644fd3087efaddbad788872a37969864ec3cfa Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 10 Sep 2023 15:02:26 -0500 Subject: [PATCH] use target from message in move to point --- .../net/client/handlers/MoveToPointHandler.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/engine/net/client/handlers/MoveToPointHandler.java b/src/engine/net/client/handlers/MoveToPointHandler.java index ddadd9cd..e29d5a62 100644 --- a/src/engine/net/client/handlers/MoveToPointHandler.java +++ b/src/engine/net/client/handlers/MoveToPointHandler.java @@ -33,23 +33,17 @@ public class MoveToPointHandler extends AbstractClientMsgHandler { if (pc == null) return false; - AbstractWorldObject target; + AbstractWorldObject target = null; Enum.GameObjectType targetType; targetType = Enum.GameObjectType.values()[msg.getTargetType()]; switch(targetType){ - case Mob: - target = Mob.getMob(msg.getTargetID()); - break; - case PlayerCharacter: - target = PlayerCharacter.getPlayerCharacter(msg.getTargetID()); - break; case Building: target = BuildingManager.getBuilding(msg.getTargetID()); break; - default: - target = null; + case NPC: + target = NPC.getNPC(msg.getTargetID()); break; }