From 914575a360bcfed589608c6c8c56ddb5796e26c4 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 17 Apr 2023 21:48:31 -0500 Subject: [PATCH] guard minion spawning work --- src/engine/ai/MobileFSM.java | 8 ++------ src/engine/gameManager/NPCManager.java | 6 ++---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/engine/ai/MobileFSM.java b/src/engine/ai/MobileFSM.java index 7ce85eef..3436d5d9 100644 --- a/src/engine/ai/MobileFSM.java +++ b/src/engine/ai/MobileFSM.java @@ -502,21 +502,17 @@ public class MobileFSM { } if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardMinion.ordinal()){ //this is a player slotted guard minion - if(mob.isAlive() == false){ + if(mob.isAlive() == false || mob.despawned){ CheckForRespawn(mob); return; } CheckToSendMobHome(mob); if(mob.npcOwner.isAlive() == false){ CheckForPlayerGuardAggro(mob); - CheckMobMovement(mob); - if(mob.getCombatTarget() != null){ - CheckForAttack(mob); - } return; } + CheckMobMovement(mob); if(mob.getCombatTarget() != null){ - CheckMobMovement(mob); CheckForAttack(mob); } return; diff --git a/src/engine/gameManager/NPCManager.java b/src/engine/gameManager/NPCManager.java index fcc40b4a..5810417b 100644 --- a/src/engine/gameManager/NPCManager.java +++ b/src/engine/gameManager/NPCManager.java @@ -319,13 +319,11 @@ public enum NPCManager { slot += guardCaptain.siegeMinionMap.size() + 1; guardCaptain.siegeMinionMap.put(mob, slot); - //mob.setInBuildingLoc(guardCaptain.building, guardCaptain); - //mob.setBindLoc(loc.add(mob.inBuildingLoc)); + mob.setInBuildingLoc(guardCaptain.building, guardCaptain); + mob.setBindLoc(loc.add(mob.inBuildingLoc)); mob.deathTime = System.currentTimeMillis(); mob.spawnTime = 900; mob.npcOwner = guardCaptain; - mob.setBindLoc(guardCaptain.building.getLoc()); - MovementManager.translocate(mob,guardCaptain.building.getLoc(),null); mob.BehaviourType = Enum.MobBehaviourType.GuardMinion; return mob; }