From 51d75146cc50f81d39192674360e9d005f0efc92 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 10 Sep 2023 14:28:32 -0500 Subject: [PATCH] NPC added to attack message handler switch --- src/engine/net/client/handlers/AttackCmdMsgHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/net/client/handlers/AttackCmdMsgHandler.java b/src/engine/net/client/handlers/AttackCmdMsgHandler.java index 1784b2cb..8f36c9fa 100644 --- a/src/engine/net/client/handlers/AttackCmdMsgHandler.java +++ b/src/engine/net/client/handlers/AttackCmdMsgHandler.java @@ -8,10 +8,7 @@ import engine.net.client.ClientConnection; import engine.net.client.msg.AttackCmdMsg; import engine.net.client.msg.ClientNetMsg; import engine.net.client.msg.TargetedActionMsg; -import engine.objects.AbstractWorldObject; -import engine.objects.Building; -import engine.objects.Mob; -import engine.objects.PlayerCharacter; +import engine.objects.*; /* * @Author: @@ -59,6 +56,9 @@ public class AttackCmdMsgHandler extends AbstractClientMsgHandler { case Building: target = BuildingManager.getBuilding(msg.getTargetID()); break; + case NPC: + target = NPC.getNPC(msg.getTargetID()); + break; default: return true;//cannot attack anything other than the 3 above }