From 1b94f3f71d52b7873d2bc5bdfe3914bd7ed303cf Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 25 Jun 2023 21:32:36 -0500 Subject: [PATCH] guard dogs --- src/engine/gameManager/BuildingManager.java | 10 ++++++++++ src/engine/objects/Mob.java | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/BuildingManager.java b/src/engine/gameManager/BuildingManager.java index 33b6b660..b5ee8e94 100644 --- a/src/engine/gameManager/BuildingManager.java +++ b/src/engine/gameManager/BuildingManager.java @@ -547,7 +547,17 @@ public enum BuildingManager { return true; } + if (contract.getContractID() == 910) { + //guard dog + mob = Mob.createMob(contract.getMobbaseID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), true, zone, building, contract.getContractID(), pirateName, rank); + + if (mob == null) + return false; + WorldGrid.addObject(mob, contractOwner); + + return true; + } npc = NPC.createNPC(pirateName, contract.getObjectUUID(), Vector3fImmutable.ZERO, contractOwner.getGuild(), false, zone, (short) rank, building); if (npc == null) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index c0bf2d2a..d94474fe 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1966,7 +1966,9 @@ public class Mob extends AbstractIntelligenceAgent { Bounds mobBounds = Bounds.borrow(); mobBounds.setBounds(this.getLoc()); this.setBounds(mobBounds); - + if(this.contract != null && this.contract.getContractID() == 910){ + this.isPlayerGuard = true; + } //assign 5 random patrol points for regular mobs if (!this.isGuard() && !this.isPlayerGuard() && !this.isPet() && !this.isNecroPet() && !this.isSummonedPet() && !this.isCharmedPet()) {