From cdd074c0ae7fd8f46e2615b22e18f6427466c874 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 1 Aug 2023 18:56:56 -0500 Subject: [PATCH] respawn que null check --- src/engine/ai/MobileFSMManager.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/engine/ai/MobileFSMManager.java b/src/engine/ai/MobileFSMManager.java index 98d81110..c4bd7624 100644 --- a/src/engine/ai/MobileFSMManager.java +++ b/src/engine/ai/MobileFSMManager.java @@ -95,9 +95,11 @@ public class MobileFSMManager { for (Zone zone : ZoneManager.getAllZones()) { if(zone.respawnQue.size() > 0 && zone.lastRespawn + 100 < System.currentTimeMillis()){ - zone.respawnQue.get(0).respawn(); - zone.respawnQue.remove(0); - zone.lastRespawn = System.currentTimeMillis(); + if(zone.respawnQue.get(0) != null) { + zone.respawnQue.get(0).respawn(); + zone.respawnQue.remove(0); + zone.lastRespawn = System.currentTimeMillis(); + } } for (Mob mob : zone.zoneMobSet) {