|
|
@ -92,23 +92,13 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { |
|
|
|
|
|
|
|
|
|
|
|
int validation_result = ForgeManager.submit(workOrder); |
|
|
|
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) { |
|
|
|
if (validation_result != 0) { |
|
|
|
ErrorPopupMsg.sendErrorPopup(player, validation_result); |
|
|
|
ErrorPopupMsg.sendErrorPopup(player, validation_result); |
|
|
|
return true; |
|
|
|
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; |
|
|
|
break; |
|
|
|
case JUNK: |
|
|
|
case JUNK: |
|
|
|
junkItem(msg.templateID, vendorNPC, origin); |
|
|
|
junkItem(msg.templateID, vendorNPC, origin); |
|
|
|