From 6806ae3dc003c7a4ff5476ebed9c0af099b2823f Mon Sep 17 00:00:00 2001 From: MagicBot Date: Thu, 14 Mar 2024 07:35:13 -0400 Subject: [PATCH] isConsumable not used as driven by switch. --- .../client/handlers/ObjectActionMsgHandler.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/engine/net/client/handlers/ObjectActionMsgHandler.java b/src/engine/net/client/handlers/ObjectActionMsgHandler.java index ef1d9651..4c63c488 100644 --- a/src/engine/net/client/handlers/ObjectActionMsgHandler.java +++ b/src/engine/net/client/handlers/ObjectActionMsgHandler.java @@ -1,7 +1,6 @@ package engine.net.client.handlers; import engine.Enum; -import engine.Enum.ItemType; import engine.exception.MsgSendException; import engine.gameManager.*; import engine.math.Bounds; @@ -75,17 +74,9 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler { return true; } - ItemBase ib = item.getItemBase(); - - if (ib == null) { - return true; - } - if (itemMan.doesCharOwnThisItem(item.getObjectUUID())) { - if (ib.isConsumable() || item.template.item_type.equals(ItemType.REAGENT)) { - - int uuid = item.templsteID; + int uuid = item.templsteID; switch (item.template.item_type) { @@ -273,7 +264,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler { // test character targeted - if (ib.getUUID() == 910005) { + if (item.template.template_id == 910005) { // test for valid target type if (target.getObjectType() == Enum.GameObjectType.PlayerCharacter) @@ -316,7 +307,6 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler { DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); // itemMan.consume(item); } - } } else { // TODO log item does not belong to player // System.out.println("Item does not belong to player");