Rework of error handling.

This commit is contained in:
2024-04-14 12:08:51 -04:00
parent 5e7515a9ad
commit 2feba8ac50
2 changed files with 33 additions and 30 deletions
@@ -88,14 +88,16 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
workOrder.item_name_override = msg.name;
workOrder.multiple_slot_request = msg.size;
// Validate vendor can roll this item
// Submit workOder to begin rolling items
if (ForgeManager.validate(player, workOrder) == false)
int validation_result = ForgeManager.submit(workOrder);
// workOrder cannot be completed
if (validation_result != 0) {
ErrorPopupMsg.sendErrorPopup(player, validation_result);
return true;
// Start rolling the item(s)
ForgeManager.submit(workOrder);
}
//Create Multiple Item Function.. Fill all empty slots