From 69aca2c728c02600ea3cd7cee3c0ffc3ee95f319 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 21 Apr 2024 20:05:16 -0500 Subject: [PATCH] disc resapwn attempt 2 --- src/engine/server/world/WorldServer.java | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/engine/server/world/WorldServer.java b/src/engine/server/world/WorldServer.java index 4030c364..42442a52 100644 --- a/src/engine/server/world/WorldServer.java +++ b/src/engine/server/world/WorldServer.java @@ -257,12 +257,23 @@ public class WorldServer { if (LocalDateTime.now().isAfter(nextDiscSpawn)) { for(Mob dropper : Mob.disciplineDroppers) { - if (dropper.discDelay == 6 && (LocalDateTime.now().getHour() == 6 || LocalDateTime.now().getHour() == 12 || LocalDateTime.now().getHour() == 18 || LocalDateTime.now().getHour() == 0)) { - if (!dropper.isAlive()) { - dropper.respawn(); + if(dropper.isAlive() == false){ + if(dropper.discDelay == 1) { + if (Zone.respawnQue.contains(dropper) == false) { + Zone.respawnQue.add(dropper); + } } - } else if (!dropper.isAlive()) { - dropper.respawn(); + } else if(dropper.discDelay == 6){ + switch(LocalDateTime.now().getHour()){ + case 3: + case 9: + case 15: + case 21: + Zone.respawnQue.add(dropper); + break; + } + } else{ + Logger.error(dropper.getName() + " Disc Delay Not Set As 1 or 6"); } } nextDiscSpawn = LocalDateTime.now().plusHours(1).withMinute(0).withSecond(0);