Browse Source

guard dogs

master
FatBoy-DOTC 2 years ago
parent
commit
1b94f3f71d
  1. 10
      src/engine/gameManager/BuildingManager.java
  2. 4
      src/engine/objects/Mob.java

10
src/engine/gameManager/BuildingManager.java

@ -547,7 +547,17 @@ public enum BuildingManager { @@ -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)

4
src/engine/objects/Mob.java

@ -1966,7 +1966,9 @@ public class Mob extends AbstractIntelligenceAgent { @@ -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()) {

Loading…
Cancel
Save