From ec5a8f52819510bca5b966bb52e7523cc67f3d4a Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 7 Apr 2024 13:25:42 -0400 Subject: [PATCH] Logic cleanup. --- .../net/client/handlers/ItemProductionMsgHandler.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/engine/net/client/handlers/ItemProductionMsgHandler.java b/src/engine/net/client/handlers/ItemProductionMsgHandler.java index 0896acb8..587c8f5c 100644 --- a/src/engine/net/client/handlers/ItemProductionMsgHandler.java +++ b/src/engine/net/client/handlers/ItemProductionMsgHandler.java @@ -71,16 +71,18 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { case PRODUCE: boolean isRandom = false; + if (msg.unknown03 != 0 && msg.pToken == 0 && msg.sToken == 0) isRandom = true; + //Create Multiple Item Function.. Fill all empty slots + if (msg.size > 0) { int emptySlots = vendorNPC.getRank() - vendorNPC.getRolling().size(); - if (emptySlots > 0) { - for (int i = 0; i < emptySlots; i++) { + + if (emptySlots > 0) + for (int i = 0; i < emptySlots; i++) vendorNPC.produceItem(player.getObjectUUID(), msg.total_to_produce, isRandom, msg.pToken, msg.sToken, msg.name, msg.templateID); - } - } } else vendorNPC.produceItem(player.getObjectUUID(), msg.total_to_produce, isRandom, msg.pToken, msg.sToken, msg.name, msg.templateID); break;