From b28d31ec44713e326c3c5d0b5c927aac5b8f11b7 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 27 Jul 2023 22:10:47 -0500 Subject: [PATCH] respawn que work --- src/engine/ai/MobileFSM.java | 7 ++++++- src/engine/objects/Mob.java | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/engine/ai/MobileFSM.java b/src/engine/ai/MobileFSM.java index d4a7180e..f977be90 100644 --- a/src/engine/ai/MobileFSM.java +++ b/src/engine/ai/MobileFSM.java @@ -373,9 +373,11 @@ public class MobileFSM { CheckForRespawn(mob); return; } - if (mob.playerAgroMap.isEmpty() && mob.isPlayerGuard == false && mob.BehaviourType.ordinal() != Enum.MobBehaviourType.Pet1.ordinal()) + if (mob.playerAgroMap.isEmpty() && mob.isPlayerGuard == false && mob.BehaviourType.ordinal() != Enum.MobBehaviourType.Pet1.ordinal()) { //no players loaded, no need to proceed + mob.setCombatTarget(null); return; + } if (mob.isCombat() && mob.getCombatTarget() == null) { mob.setCombat(false); UpdateStateMsg rwss = new UpdateStateMsg(); @@ -402,6 +404,9 @@ public class MobileFSM { } } } + //if(mob.getTimestamps().containsKey("LOCATIONSYNC") == false){ + // mob.getTimestamps().put("LOCATIONSYNC",System.currentTimeMillis()); + //} switch (mob.BehaviourType) { case GuardCaptain: GuardCaptainLogic(mob); diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 8bc7d125..cacf16b8 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1383,7 +1383,7 @@ public class Mob extends AbstractIntelligenceAgent { public void respawn() { //Commenting out Mob ID rotation. this.despawned = false; - this.playerAgroMap.clear(); + //this.playerAgroMap.clear(); this.setCombatTarget(null); this.setHealth(this.healthMax); this.stamina.set(this.staminaMax);