From 9bbe9b399ee463d57e4f1c96d67f36d26176b440 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 6 Apr 2024 16:08:06 -0400 Subject: [PATCH] Better name for map --- .../handlers/ItemProductionMsgHandler.java | 4 ++-- src/engine/net/client/msg/ItemProductionMsg.java | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/engine/net/client/handlers/ItemProductionMsgHandler.java b/src/engine/net/client/handlers/ItemProductionMsgHandler.java index e47d7596..c5a32c33 100644 --- a/src/engine/net/client/handlers/ItemProductionMsgHandler.java +++ b/src/engine/net/client/handlers/ItemProductionMsgHandler.java @@ -473,7 +473,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { junkItem(msg.getTemplateID(), vendorNPC, origin); break; case ACTION_RECYCLE: - recycleItem(msg.getItemIDtoTypeMap(), vendorNPC, origin); + recycleItem(msg.getItems(), vendorNPC, origin); msg.setActionType(7); dispatch = Dispatch.borrow(player, msg); DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); @@ -497,7 +497,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { setItemPrice(msg.getItemType(), msg.getTemplateID(), msg.getItemPrice(), vendorNPC, origin); break; case ACTION_TAKE: - takeItem(msg.getItemIDtoTypeMap(), vendorNPC, origin); + takeItem(msg.getItems(), vendorNPC, origin); dispatch = Dispatch.borrow(player, msg); DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY); break; diff --git a/src/engine/net/client/msg/ItemProductionMsg.java b/src/engine/net/client/msg/ItemProductionMsg.java index c5ae5df3..ea684a7a 100644 --- a/src/engine/net/client/msg/ItemProductionMsg.java +++ b/src/engine/net/client/msg/ItemProductionMsg.java @@ -49,7 +49,7 @@ public class ItemProductionMsg extends ClientNetMsg { private int npcUUID; private boolean add; private int itemPrice; - private HashMap itemIDtoTypeMap; + private HashMap items; /** * This is the general purpose constructor. @@ -228,11 +228,11 @@ public class ItemProductionMsg extends ClientNetMsg { writer.put((byte) 1); writer.putInt(building.getStrongboxValue()); - if (this.itemIDtoTypeMap != null) { - writer.putInt(this.itemIDtoTypeMap.size()); + if (this.items != null) { + writer.putInt(this.items.size()); - for (int itemID : this.itemIDtoTypeMap.keySet()) { - writer.putInt(this.itemIDtoTypeMap.get(itemID)); + for (int itemID : this.items.keySet()) { + writer.putInt(this.items.get(itemID)); writer.putInt(itemID); } @@ -401,7 +401,7 @@ public class ItemProductionMsg extends ClientNetMsg { tempIDs.put(this.templateID, type); } reader.getInt(); - this.itemIDtoTypeMap = tempIDs; + this.items = tempIDs; break; case ACTION_DEPOSIT: this.itemType = reader.getInt(); @@ -527,8 +527,8 @@ public class ItemProductionMsg extends ClientNetMsg { return npcUUID; } - public HashMap getItemIDtoTypeMap() { - return itemIDtoTypeMap; + public HashMap getItems() { + return items; } /**