From 2ef0d4305cacccb3c0369e613364ad301fee0ba5 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 6 Jun 2024 15:27:07 -0500 Subject: [PATCH] divide by 0 error --- src/engine/objects/Warehouse.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/objects/Warehouse.java b/src/engine/objects/Warehouse.java index d4216d5d..1195fcd9 100644 --- a/src/engine/objects/Warehouse.java +++ b/src/engine/objects/Warehouse.java @@ -1336,7 +1336,7 @@ public class Warehouse extends AbstractWorldObject { } public static int getCostForResource(int id){ - int newCost = 0; + int newCost = 1; switch(id){ case 1580000://stone newCost = 3000; @@ -1413,6 +1413,6 @@ public class Warehouse extends AbstractWorldObject { if(id == 1705032) return 10; - return (int)(3000000 / (getCostForResource(id))); + return (int)(3000000 / getCostForResource(id)); } }