From 06c4b7ca3c62b86d883c571c9fbee0e94e2cb3d1 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 15 Jul 2023 15:48:11 -0500 Subject: [PATCH] ghost mob fix --- src/engine/ai/MobileFSM.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/engine/ai/MobileFSM.java b/src/engine/ai/MobileFSM.java index 9eec4af8..df11c008 100644 --- a/src/engine/ai/MobileFSM.java +++ b/src/engine/ai/MobileFSM.java @@ -489,6 +489,7 @@ public class MobileFSM { if (System.currentTimeMillis() > aiAgent.deathTime + MBServerStatics.DESPAWN_TIMER_WITH_LOOT) { aiAgent.despawn(); aiAgent.deathTime = System.currentTimeMillis(); + return; } //No items in inventory. } else { @@ -497,17 +498,20 @@ public class MobileFSM { if (System.currentTimeMillis() > aiAgent.deathTime + MBServerStatics.DESPAWN_TIMER_ONCE_LOOTED) { aiAgent.despawn(); aiAgent.deathTime = System.currentTimeMillis(); + return; } //Mob never had Loot. } else { if (System.currentTimeMillis() > aiAgent.deathTime + MBServerStatics.DESPAWN_TIMER) { aiAgent.despawn(); aiAgent.deathTime = System.currentTimeMillis(); + return; } } } } else if (System.currentTimeMillis() > (aiAgent.deathTime + (aiAgent.spawnTime * 1000))) { aiAgent.respawn(); + return; } }