Browse Source

Begin integration

combat-2
MagicBot 8 months ago
parent
commit
5e5b9884ef
  1. 14
      src/engine/net/client/handlers/ItemProductionMsgHandler.java

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

@ -92,23 +92,13 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { @@ -92,23 +92,13 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
int validation_result = ForgeManager.submit(workOrder);
// workOrder cannot be completed
// workOrder could not be completed
// Report back to the user the reason why
if (validation_result != 0) {
ErrorPopupMsg.sendErrorPopup(player, validation_result);
return 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++)
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;
case JUNK:
junkItem(msg.templateID, vendorNPC, origin);

Loading…
Cancel
Save