Browse Source

Logic cleanup.

combat-2
MagicBot 9 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 {
case PRODUCE: case PRODUCE:
boolean isRandom = false; boolean isRandom = false;
if (msg.unknown03 != 0 && msg.pToken == 0 && msg.sToken == 0) if (msg.unknown03 != 0 && msg.pToken == 0 && msg.sToken == 0)
isRandom = true; isRandom = true;
//Create Multiple Item Function.. Fill all empty slots //Create Multiple Item Function.. Fill all empty slots
if (msg.size > 0) { if (msg.size > 0) {
int emptySlots = vendorNPC.getRank() - vendorNPC.getRolling().size(); 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); vendorNPC.produceItem(player.getObjectUUID(), msg.total_to_produce, isRandom, msg.pToken, msg.sToken, msg.name, msg.templateID);
}
}
} else } else
vendorNPC.produceItem(player.getObjectUUID(), msg.total_to_produce, isRandom, msg.pToken, msg.sToken, msg.name, msg.templateID); vendorNPC.produceItem(player.getObjectUUID(), msg.total_to_produce, isRandom, msg.pToken, msg.sToken, msg.name, msg.templateID);
break; break;

Loading…
Cancel
Save