From a963a331a2fec7cd36eb4097db87fd382c7cc971 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 26 Aug 2024 20:10:16 -0500 Subject: [PATCH] mobs that spawn with no loot respawn again --- src/engine/mobileAI/MobAI.java | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 7fdec6f2..7c25a90e 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -864,16 +864,14 @@ public class MobAI { return; } //No items in inventory. + } else if (aiAgent.isHasLoot()) { + if (System.currentTimeMillis() > aiAgent.deathTime + MBServerStatics.DESPAWN_TIMER_ONCE_LOOTED) { + aiAgent.despawn(); + aiAgent.deathTime = System.currentTimeMillis(); + return; + } + //Mob never had Loot. } else { - //Mob's Loot has been looted. - if (aiAgent.isHasLoot()) { - 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(); @@ -881,7 +879,6 @@ public class MobAI { } } } - } if(Mob.discDroppers.contains(aiAgent)) return;