From a7a93b8500df92499723820e5c7a2fc41841e4d3 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Fri, 25 Aug 2023 17:05:46 -0400 Subject: [PATCH] Tweak to bindloc for minions. --- src/engine/objects/Mob.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 78609658..0e5540b6 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -653,7 +653,7 @@ public class Mob extends AbstractIntelligenceAgent { minionMobile.guardedCity = guardCaptain.guardedCity; minionMobile.parentZoneUUID = guardCaptain.parentZoneUUID; - minionMobile.bindLoc = guardCaptain.building.getLoc(); + minionMobile.bindLoc = Vector3fImmutable.ZERO; //grab name from minionbase. @@ -1689,10 +1689,12 @@ public class Mob extends AbstractIntelligenceAgent { else this.contract = DbManager.ContractQueries.GET_CONTRACT(this.contractUUID); - // Setup mobile AI + // Setup mobile AI and equipset for contract if (this.contract != null) { + this.equipmentSetID = this.contract.getEquipmentSet(); + // Load AI for guard captains if (NPC.ISGuardCaptain(contract.getContractID()) || this.contract.getContractID() == 910) { // Guard Dog @@ -1734,13 +1736,9 @@ public class Mob extends AbstractIntelligenceAgent { if (this.firstName.isEmpty()) this.firstName = this.mobBase.getFirstName(); - if (this.contract != null) { - - this.equipmentSetID = this.contract.getEquipmentSet(); - + if (this.contract != null) if (this.lastName.isEmpty()) this.lastName = this.getContract().getName(); - } this.healthMax = this.mobBase.getHealthMax(); this.manaMax = 0; @@ -1787,10 +1785,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) NPCManager.slotCharacterInBuilding(this); - else - this.bindLoc = building.getLoc(); } // Setup location for this Mobile