Browse Source

Bugfix in delay override

combat-2
MagicBot 9 months ago
parent
commit
052867893c
  1. 7
      src/engine/loot/WorkOrder.java

7
src/engine/loot/WorkOrder.java

@ -11,7 +11,6 @@ package engine.loot; @@ -11,7 +11,6 @@ package engine.loot;
import engine.mbEnums;
import engine.objects.Item;
import engine.objects.NPC;
import org.jetbrains.annotations.NotNull;
import java.time.Duration;
import java.time.Instant;
@ -22,8 +21,6 @@ import java.util.HashMap; @@ -22,8 +21,6 @@ import java.util.HashMap;
import java.util.concurrent.Delayed;
import java.util.concurrent.TimeUnit;
import static java.lang.Math.toIntExact;
public class WorkOrder implements Delayed {
public int workOrderID;
@ -57,8 +54,8 @@ public class WorkOrder implements Delayed { @@ -57,8 +54,8 @@ public class WorkOrder implements Delayed {
}
@Override
public int compareTo(@NotNull Delayed o) {
return toIntExact(this.completionTime - ((WorkOrder) o).completionTime);
public int compareTo(Delayed o) {
return Long.compare(this.completionTime, ((WorkOrder) o).completionTime);
}
public String toString() {

Loading…
Cancel
Save