From c652379a5f1c23ff46cf298e51adf5f46bd6a404 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 15 Jul 2024 19:08:40 -0500 Subject: [PATCH] mob region lookup --- src/engine/mobileAI/MobAI.java | 11 ++++++----- src/engine/objects/Mob.java | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index bd01fb3e..5a7c6f36 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -871,14 +871,15 @@ public class MobAI { } } } - } else if (System.currentTimeMillis() > (aiAgent.deathTime + (aiAgent.spawnTime * 1000L))) { + } - if(Mob.discDroppers.contains(aiAgent)) - return; + if(Mob.discDroppers.contains(aiAgent)) + return; - if(aiAgent.StrongholdGuardian || aiAgent.StrongholdEpic || aiAgent.StrongholdCommander) - return; + if(aiAgent.StrongholdGuardian || aiAgent.StrongholdEpic || aiAgent.StrongholdCommander) + return; + if (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 c8a69545..0d562a4c 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1285,7 +1285,7 @@ public class Mob extends AbstractIntelligenceAgent { } setLoc(newLoc); - this.region = AbstractWorldObject.GetRegionByWorldObject(this); + this.region = Regions.GetRegionForTeleport(this.loc);//AbstractWorldObject.GetRegionByWorldObject(this); //Next update will be end Loc, lets stop him here. }