Browse Source

Slot count calculated

combat-2
MagicBot 7 months ago
parent
commit
178bb3718a
  1. 4
      src/engine/gameManager/ForgeManager.java
  2. 1
      src/engine/net/client/handlers/ItemProductionMsgHandler.java

4
src/engine/gameManager/ForgeManager.java

@ -119,9 +119,9 @@ public enum ForgeManager implements Runnable { @@ -119,9 +119,9 @@ public enum ForgeManager implements Runnable {
int availableSlots = workOrder.vendor.getRank();
for (WorkOrder npcWorkOrder : workOrder.vendor.workOrders) {
for (WorkOrder npcWorkOrder : workOrder.vendor.workOrders)
availableSlots = availableSlots - npcWorkOrder.slotCount;
}
return availableSlots;
}
}

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

@ -87,6 +87,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { @@ -87,6 +87,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
workOrder.suffixToken = msg.sToken;
workOrder.itemName = msg.name;
workOrder.rollingDuration = ForgeManager.calcRollingDuration(workOrder);
workOrder.slotCount = ForgeManager.getAvailableSlots(workOrder);
// Validate vendor can roll this item

Loading…
Cancel
Save