Browse Source

Update to minion building/location mechanic.

combat-2
MagicBot 1 year ago
parent
commit
fa3aa24a3d
  1. 15
      src/engine/objects/Mob.java

15
src/engine/objects/Mob.java

@ -612,7 +612,8 @@ public class Mob extends AbstractIntelligenceAgent {
minionMobile.loadID = guardCaptain.loadID; minionMobile.loadID = guardCaptain.loadID;
minionMobile.firstName = minionName; minionMobile.firstName = minionName;
minionMobile.equipmentSetID = guardCaptain.equipmentSetID; minionMobile.equipmentSetID = guardCaptain.equipmentSetID;
minionMobile.buildingUUID = guardCaptain.building.getObjectUUID();
minionMobile.guildUUID = guardCaptain.guildUUID;
minionMobile.runeSet = guardCaptain.runeSet; minionMobile.runeSet = guardCaptain.runeSet;
minionMobile.enemy = guardCaptain.enemy; minionMobile.enemy = guardCaptain.enemy;
minionMobile.notEnemy = guardCaptain.notEnemy; minionMobile.notEnemy = guardCaptain.notEnemy;
@ -1729,10 +1730,10 @@ public class Mob extends AbstractIntelligenceAgent {
// with the exceptions being mobiles // with the exceptions being mobiles
// with a contract. // with a contract.
this.bindLoc = building.getLoc().add(bindLoc); if (this.contract != null)
if (this.contract != null || this.isSiege)
NPCManager.slotCharacterInBuilding(this); NPCManager.slotCharacterInBuilding(this);
else
this.bindLoc = building.getLoc().add(bindLoc);
} }
// Setup location for this Mobile // Setup location for this Mobile
@ -1806,8 +1807,10 @@ public class Mob extends AbstractIntelligenceAgent {
Vector3fImmutable newPatrolPoint = Vector3fImmutable.getRandomPointInCircle(this.getBindLoc(), patrolRadius); Vector3fImmutable newPatrolPoint = Vector3fImmutable.getRandomPointInCircle(this.getBindLoc(), patrolRadius);
this.patrolPoints.add(newPatrolPoint); this.patrolPoints.add(newPatrolPoint);
if (i == 1) if (i == 1) {
MovementManager.translocate(this, newPatrolPoint, null); this.loc = newPatrolPoint;
this.endLoc = newPatrolPoint;
}
} }
} }

Loading…
Cancel
Save