From f7959a51bda29784c799e74472ada281b120e381 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 12 Apr 2024 16:43:22 -0400 Subject: [PATCH] Rolling duration updated --- src/engine/gameManager/ForgeManager.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/engine/gameManager/ForgeManager.java b/src/engine/gameManager/ForgeManager.java index 9dd7dd67..efd2cbc2 100644 --- a/src/engine/gameManager/ForgeManager.java +++ b/src/engine/gameManager/ForgeManager.java @@ -140,18 +140,20 @@ public enum ForgeManager implements Runnable { public static long calcRollingDuration(WorkOrder workOrder) { - long rollingDuration; - float rate = (float) 2.5 * (workOrder.vendor.getBuilding().getRank() - 1); - float baseTime = (20 - rate) * 60000; + float rollingDuration; + + rollingDuration = workOrder.vendor.getBuilding().getRank() * 5L + 40; + rollingDuration *= 60000; + rollingDuration *= Float.parseFloat(ConfigManager.MB_PRODUCTION_RATE.getValue()); + ItemTemplate template = ItemTemplate.templates.get(workOrder.templateID); // Bane circles if (template.item_bane_rank > 0) - baseTime = template.item_bane_rank * 60 * 60 * 3 * 1000; + rollingDuration = (long) template.item_bane_rank * 60 * 60 * 3 * 1000 * Float.parseFloat(ConfigManager.MB_PRODUCTION_RATE.getValue()); - rollingDuration = (long) (baseTime * Float.parseFloat(ConfigManager.MB_PRODUCTION_RATE.getValue())); - return rollingDuration; + return (long) rollingDuration; } public static int calcAvailableSlots(WorkOrder workOrder) {