Contract moved to AbstractCharacter.
Arty tower restricted to a single tower captain.
This commit is contained in:
@@ -117,9 +117,10 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
||||
private long lastHateUpdate = 0;
|
||||
private boolean collided = false;
|
||||
protected Regions lastRegion = null;
|
||||
|
||||
|
||||
protected boolean movingUp = false;
|
||||
|
||||
public Contract contract;
|
||||
|
||||
|
||||
/**
|
||||
* No Id Constructor
|
||||
|
||||
@@ -254,10 +254,16 @@ public class Contract extends AbstractGameObject {
|
||||
if (this.allowedBuildings.size() == 0)
|
||||
return false;
|
||||
|
||||
// Restrict arty towers to a single captain
|
||||
|
||||
if (this.getContractID() == 842) // Tower Arty Captain
|
||||
for (AbstractCharacter hireling : building.getHirelings().keySet())
|
||||
if (hireling.contract.getContractID() == 842)
|
||||
return false;
|
||||
|
||||
// Binary match
|
||||
return (building.getBlueprint().getBuildingGroup().elementOf(this.allowedBuildings));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public int getEquipmentSet() {
|
||||
return equipmentSet;
|
||||
|
||||
@@ -65,7 +65,6 @@ public class Mob extends AbstractIntelligenceAgent {
|
||||
public int spawnTime;
|
||||
public Zone parentZone;
|
||||
public Building building;
|
||||
public Contract contract;
|
||||
public boolean hasLoot = false;
|
||||
public boolean isPlayerGuard = false;
|
||||
public AbstractCharacter npcOwner;
|
||||
|
||||
@@ -52,7 +52,7 @@ public class NPC extends AbstractCharacter {
|
||||
protected MobBase mobBase;
|
||||
protected String name;
|
||||
public Building building;
|
||||
protected Contract contract;
|
||||
|
||||
protected int dbID;
|
||||
protected int currentID;
|
||||
private DateTime upgradeDateTime = null;
|
||||
|
||||
Reference in New Issue
Block a user