|
|
@ -103,13 +103,13 @@ public enum ForgeManager implements Runnable { |
|
|
|
|
|
|
|
|
|
|
|
public static int submit(WorkOrder workOrder) { |
|
|
|
public static int submit(WorkOrder workOrder) { |
|
|
|
|
|
|
|
|
|
|
|
// Make sure vendor can roll the formulae, warehouse can afford
|
|
|
|
// Make sure vendor can roll the formulae, warehouse can
|
|
|
|
// the wordOrder and other related checks.
|
|
|
|
// afford this wordOrder and other related checks.
|
|
|
|
|
|
|
|
|
|
|
|
int validation_result = ItemManager.validate(workOrder); |
|
|
|
int validation_result = ItemManager.validate(workOrder); |
|
|
|
|
|
|
|
|
|
|
|
// The return code is used by the submitter as a
|
|
|
|
// The return code is used by the submitter as a
|
|
|
|
// popup error message to the player.
|
|
|
|
// popup error message for the player.
|
|
|
|
|
|
|
|
|
|
|
|
if (validation_result != 0) |
|
|
|
if (validation_result != 0) |
|
|
|
return validation_result; |
|
|
|
return validation_result; |
|
|
@ -172,12 +172,12 @@ public enum ForgeManager implements Runnable { |
|
|
|
|
|
|
|
|
|
|
|
int availableSlots = workOrder.vendor.getRank(); |
|
|
|
int availableSlots = workOrder.vendor.getRank(); |
|
|
|
|
|
|
|
|
|
|
|
// Slots currently used up by the npc workOrders
|
|
|
|
// Subtract slots currently being used by npc workOrders
|
|
|
|
|
|
|
|
|
|
|
|
for (WorkOrder npcWorkOrder : ForgeManager.vendorWorkOrderLookup.get(workOrder.vendor)) |
|
|
|
for (WorkOrder npcWorkOrder : ForgeManager.vendorWorkOrderLookup.get(workOrder.vendor)) |
|
|
|
availableSlots = availableSlots - npcWorkOrder.slots_used; |
|
|
|
availableSlots = availableSlots - npcWorkOrder.slots_used; |
|
|
|
|
|
|
|
|
|
|
|
// Single item rolls are msg_size of 0;
|
|
|
|
// Single item rolls are always a single slot
|
|
|
|
|
|
|
|
|
|
|
|
if (availableSlots > 0 && !workOrder.multiple_slot_request) |
|
|
|
if (availableSlots > 0 && !workOrder.multiple_slot_request) |
|
|
|
availableSlots = 1; |
|
|
|
availableSlots = 1; |
|
|
|