From 4f08d7286e4c8b688f76dfc9d24b04591ba1f2d1 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 11 Jan 2025 23:56:04 -0600 Subject: [PATCH] mob respawn issue resolved --- src/engine/mobileAI/MobAI.java | 4 +++- src/engine/objects/Mob.java | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 174f9d62..625be08a 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -884,6 +884,8 @@ public class MobAI { return; } } + aiAgent.despawn(); + return; } if(Mob.discDroppers.contains(aiAgent)) @@ -892,7 +894,7 @@ public class MobAI { if(aiAgent.StrongholdGuardian || aiAgent.StrongholdEpic || aiAgent.StrongholdCommander) return; - if (System.currentTimeMillis() > (aiAgent.deathTime + (aiAgent.spawnTime * 1000L))) { + if (aiAgent.despawned && System.currentTimeMillis() > (aiAgent.deathTime + (aiAgent.spawnTime * 1000L))) { if (!Zone.respawnQue.contains(aiAgent)) { Zone.respawnQue.add(aiAgent); } diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 240c3f3f..558660b9 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1442,6 +1442,8 @@ public class Mob extends AbstractIntelligenceAgent { loadInventory(); this.updateLocation(); + this.stopPatrolTime = 0; + this.lastPatrolPointIndex = 0; } public void despawn() {