From aa8f59f6f78e62847a5dd6ce740b4de213a30e45 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 19 Apr 2023 19:05:24 -0500 Subject: [PATCH] wall archer debugging --- src/engine/gameManager/BuildingManager.java | 1 - src/engine/gameManager/NPCManager.java | 2 +- src/engine/objects/Mob.java | 6 +++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index 7b53208d..bbf6b38f 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -478,7 +478,6 @@ public enum BuildingManager { mob.setRank(rank); mob.setPlayerGuard(true); mob.setParentZone(zone); - mob.BehaviourType = Enum.MobBehaviourType.GuardWallArcher; return true; } if (NPC.ISGuardCaptain(contractID.getContractID())) { diff --git a/src/engine/gameManager/NPCManager.java b/src/engine/gameManager/NPCManager.java index 5832d648..caf2b9e3 100644 --- a/src/engine/gameManager/NPCManager.java +++ b/src/engine/gameManager/NPCManager.java @@ -319,7 +319,7 @@ public enum NPCManager { slot += guardCaptain.siegeMinionMap.size() + 1; guardCaptain.siegeMinionMap.put(mob, slot); - //mob.setInBuildingLoc(guardCaptain.building, guardCaptain); + mob.setInBuildingLoc(guardCaptain.building, guardCaptain); //mob.setBindLoc(loc.add(mob.inBuildingLoc)); mob.setLoc(guardCaptain.building.getLoc()); mob.setLastRegion(AbstractWorldObject.GetRegionByWorldObject(mob)); diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 74634b5a..8be4b000 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -2002,7 +2002,11 @@ public class Mob extends AbstractIntelligenceAgent { this.BehaviourType = this.getMobBase().fsm; } if(this.isPlayerGuard() && this.contract != null){ - this.BehaviourType = Enum.MobBehaviourType.GuardCaptain; + if(NPC.ISWallArcher(this.getContract().getContractID())){ + this.BehaviourType = MobBehaviourType.GuardWallArcher; + } else { + this.BehaviourType = Enum.MobBehaviourType.GuardCaptain; + } } } catch (Exception e) { Logger.error(e.getMessage());