Browse Source

Logic cleanup.

combat-2
MagicBot 7 months ago
parent
commit
ec5a8f5281
  1. 10
      src/engine/net/client/handlers/ItemProductionMsgHandler.java

10
src/engine/net/client/handlers/ItemProductionMsgHandler.java

@ -71,16 +71,18 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { @@ -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;

Loading…
Cancel
Save