Browse Source

divide by 0 error

lakebane-master
FatBoy-DOTC 6 months ago
parent
commit
2ef0d4305c
  1. 4
      src/engine/objects/Warehouse.java

4
src/engine/objects/Warehouse.java

@ -1336,7 +1336,7 @@ public class Warehouse extends AbstractWorldObject { @@ -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 { @@ -1413,6 +1413,6 @@ public class Warehouse extends AbstractWorldObject {
if(id == 1705032)
return 10;
return (int)(3000000 / (getCostForResource(id)));
return (int)(3000000 / getCostForResource(id));
}
}

Loading…
Cancel
Save