From fa3aa24a3d1d0fd9cc8ffd73ba4ca338e9cd6696 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 26 Aug 2023 09:41:58 -0400 Subject: [PATCH] Update to minion building/location mechanic. --- src/engine/objects/Mob.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 6e84609b..7441dfcb 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -612,7 +612,8 @@ public class Mob extends AbstractIntelligenceAgent { minionMobile.loadID = guardCaptain.loadID; minionMobile.firstName = minionName; minionMobile.equipmentSetID = guardCaptain.equipmentSetID; - + minionMobile.buildingUUID = guardCaptain.building.getObjectUUID(); + minionMobile.guildUUID = guardCaptain.guildUUID; minionMobile.runeSet = guardCaptain.runeSet; minionMobile.enemy = guardCaptain.enemy; minionMobile.notEnemy = guardCaptain.notEnemy; @@ -1729,10 +1730,10 @@ public class Mob extends AbstractIntelligenceAgent { // with the exceptions being mobiles // with a contract. - this.bindLoc = building.getLoc().add(bindLoc); - - if (this.contract != null || this.isSiege) + if (this.contract != null) NPCManager.slotCharacterInBuilding(this); + else + this.bindLoc = building.getLoc().add(bindLoc); } // Setup location for this Mobile @@ -1806,8 +1807,10 @@ public class Mob extends AbstractIntelligenceAgent { Vector3fImmutable newPatrolPoint = Vector3fImmutable.getRandomPointInCircle(this.getBindLoc(), patrolRadius); this.patrolPoints.add(newPatrolPoint); - if (i == 1) - MovementManager.translocate(this, newPatrolPoint, null); + if (i == 1) { + this.loc = newPatrolPoint; + this.endLoc = newPatrolPoint; + } } }