From bc4222646d5afb10ad3371c2dfb1fc958dc7d208 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 10 Sep 2023 14:12:01 -0500 Subject: [PATCH] combat target usage --- src/engine/net/client/handlers/MoveToPointHandler.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/engine/net/client/handlers/MoveToPointHandler.java b/src/engine/net/client/handlers/MoveToPointHandler.java index 18076967..1d700cfe 100644 --- a/src/engine/net/client/handlers/MoveToPointHandler.java +++ b/src/engine/net/client/handlers/MoveToPointHandler.java @@ -33,12 +33,11 @@ public class MoveToPointHandler extends AbstractClientMsgHandler { if (pc == null) return false; - AbstractWorldObject target; + AbstractWorldObject target = pc.combatTarget; Enum.GameObjectType targetType; - targetType = Enum.GameObjectType.values()[msg.getTargetType()]; - if(targetType != null) { - switch (targetType) { + if(target != null) { + switch (target.getObjectType()) { case Building: target = BuildingManager.getBuilding(msg.getTargetID()); if (target == null)