From b979fbb1bcbee579c72316850fbe42892b82143b Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 6 Apr 2024 14:01:23 -0400 Subject: [PATCH] Begin message rewrite --- .../net/client/handlers/ItemProductionMsgHandler.java | 2 +- src/engine/net/client/msg/ItemProductionMsg.java | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/engine/net/client/handlers/ItemProductionMsgHandler.java b/src/engine/net/client/handlers/ItemProductionMsgHandler.java index e54001f0..8a1ecd31 100644 --- a/src/engine/net/client/handlers/ItemProductionMsgHandler.java +++ b/src/engine/net/client/handlers/ItemProductionMsgHandler.java @@ -459,7 +459,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { if (msg.getUnknown03() != 0 && msg.getpToken() == 0 && msg.getsToken() == 0) isRandom = true; //Create Multiple Item Function.. Fill all empty slots - if (msg.isMultiple()) { + if (msg.getSize() > 0) { int emptySlots = vendorNPC.getRank() - vendorNPC.getRolling().size(); if (emptySlots > 0) { for (int i = 0; i < emptySlots; i++) { diff --git a/src/engine/net/client/msg/ItemProductionMsg.java b/src/engine/net/client/msg/ItemProductionMsg.java index 251e0a9d..e65d0bf4 100644 --- a/src/engine/net/client/msg/ItemProductionMsg.java +++ b/src/engine/net/client/msg/ItemProductionMsg.java @@ -53,7 +53,6 @@ public class ItemProductionMsg extends ClientNetMsg { private int npcUUID; private boolean add; private int itemPrice; - private boolean isMultiple; private HashMap itemIDtoTypeMap; /** @@ -440,7 +439,7 @@ public class ItemProductionMsg extends ClientNetMsg { this.pToken = reader.getInt(); this.sToken = reader.getInt(); this.name = reader.getString(); - this.isMultiple = reader.getInt() != 0 ? true : false; + this.size = reader.getInt(); reader.getInt(); if (this.actionType == ACTION_COMPLETE || this.actionType == ACTION_JUNK) @@ -543,11 +542,4 @@ public class ItemProductionMsg extends ClientNetMsg { return itemPrice; } - public boolean isMultiple() { - return isMultiple; - } - - public void setMultiple(boolean isMultiple) { - this.isMultiple = isMultiple; - } }