| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -452,6 +452,7 @@ public class Mob extends AbstractIntelligenceAgent { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        minionMobile.guardCaptain = guardCaptain; | 
					 | 
					 | 
					 | 
					        minionMobile.guardCaptain = guardCaptain; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        minionMobile.spawnTime = (int) (-2.500 * guardCaptain.building.getRank() + 22.5) * 60; | 
					 | 
					 | 
					 | 
					        minionMobile.spawnTime = (int) (-2.500 * guardCaptain.building.getRank() + 22.5) * 60; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        minionMobile.behaviourType = Enum.MobBehaviourType.GuardMinion; | 
					 | 
					 | 
					 | 
					        minionMobile.behaviourType = Enum.MobBehaviourType.GuardMinion; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        minionMobile.agentType = AIAgentType.GUARDMINION; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        minionMobile.guardedCity = guardCaptain.guardedCity; | 
					 | 
					 | 
					 | 
					        minionMobile.guardedCity = guardCaptain.guardedCity; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        minionMobile.patrolPoints = guardCaptain.building.patrolPoints; | 
					 | 
					 | 
					 | 
					        minionMobile.patrolPoints = guardCaptain.building.patrolPoints; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -507,6 +508,7 @@ public class Mob extends AbstractIntelligenceAgent { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        siegeMinion.guardCaptain = artyCaptain; | 
					 | 
					 | 
					 | 
					        siegeMinion.guardCaptain = artyCaptain; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        siegeMinion.parentZoneUUID = artyCaptain.parentZoneUUID; | 
					 | 
					 | 
					 | 
					        siegeMinion.parentZoneUUID = artyCaptain.parentZoneUUID; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        siegeMinion.behaviourType = MobBehaviourType.SiegeEngine; | 
					 | 
					 | 
					 | 
					        siegeMinion.behaviourType = MobBehaviourType.SiegeEngine; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        siegeMinion.agentType = AIAgentType.SIEGEENGINE; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        siegeMinion.bindLoc = Vector3fImmutable.ZERO; | 
					 | 
					 | 
					 | 
					        siegeMinion.bindLoc = Vector3fImmutable.ZERO; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        siegeMinion.spawnTime = (60 * 15); | 
					 | 
					 | 
					 | 
					        siegeMinion.spawnTime = (60 * 15); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -541,6 +543,7 @@ public class Mob extends AbstractIntelligenceAgent { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        petMinion.healthMax = MobBase.getMobBase(loadID).getHealthMax() * (petMinion.level * 0.5f); | 
					 | 
					 | 
					 | 
					        petMinion.healthMax = MobBase.getMobBase(loadID).getHealthMax() * (petMinion.level * 0.5f); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        petMinion.health.set(petMinion.healthMax); | 
					 | 
					 | 
					 | 
					        petMinion.health.set(petMinion.healthMax); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        petMinion.behaviourType = MobBehaviourType.Pet1; | 
					 | 
					 | 
					 | 
					        petMinion.behaviourType = MobBehaviourType.Pet1; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        petMinion.agentType = AIAgentType.PET; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        petMinion.firstName = ""; | 
					 | 
					 | 
					 | 
					        petMinion.firstName = ""; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        petMinion.lastName = ""; | 
					 | 
					 | 
					 | 
					        petMinion.lastName = ""; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -1524,43 +1527,19 @@ public class Mob extends AbstractIntelligenceAgent { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.setObjectTypeMask(MBServerStatics.MASK_MOB | this.getTypeMasks()); | 
					 | 
					 | 
					 | 
					        this.setObjectTypeMask(MBServerStatics.MASK_MOB | this.getTypeMasks()); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        this.building = BuildingManager.getBuilding(this.buildingUUID); | 
					 | 
					 | 
					 | 
					        // Configure AI related values
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (this.contractUUID == 0) | 
					 | 
					 | 
					 | 
					        switch (this.behaviourType) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            this.contract = null; | 
					 | 
					 | 
					 | 
					            case GuardCaptain: | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        else | 
					 | 
					 | 
					 | 
					                this.agentType = AIAgentType.GUARDCAPTAIN; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            this.contract = DbManager.ContractQueries.GET_CONTRACT(this.contractUUID); | 
					 | 
					 | 
					 | 
					                this.spawnTime = 600; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					                this.guardedCity = ZoneManager.getCityAtLocation(this.building.getLoc()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					                break; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (this.contract != null) { | 
					 | 
					 | 
					 | 
					            case GuardWallArcher: | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					                this.agentType = AIAgentType.GUARDWALLARCHER; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            // Setup equipset for contract
 | 
					 | 
					 | 
					 | 
					                this.spawnTime = 450; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					                this.guardedCity = ZoneManager.getCityAtLocation(this.building.getLoc()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            this.equipmentSetID = this.contract.getEquipmentSet(); | 
					 | 
					 | 
					 | 
					                break; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            // Configure AI related values
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            switch (this.behaviourType) { | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                case GuardCaptain: | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    this.agentType = AIAgentType.GUARDCAPTAIN; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    this.spawnTime = 600; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    this.guardedCity = ZoneManager.getCityAtLocation(this.building.getLoc()); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    break; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                case GuardMinion: | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    this.agentType = AIAgentType.GUARDMINION; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    break; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                case GuardWallArcher: | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    this.agentType = AIAgentType.GUARDWALLARCHER; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    this.spawnTime = 450; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    this.guardedCity = ZoneManager.getCityAtLocation(this.building.getLoc()); | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                case Pet1: | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    this.agentType = AIAgentType.PET; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    break; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                case SiegeEngine: | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    this.agentType = AIAgentType.SIEGEENGINE; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                    break; | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            } | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        } | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        // Default to the mobbase for AI if nothing is in mob field to override.
 | 
					 | 
					 | 
					 | 
					        // Default to the mobbase for AI if nothing is in mob field to override.
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -1571,6 +1550,18 @@ public class Mob extends AbstractIntelligenceAgent { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (this.behaviourType == null) | 
					 | 
					 | 
					 | 
					        if (this.behaviourType == null) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            this.behaviourType = MobBehaviourType.None; | 
					 | 
					 | 
					 | 
					            this.behaviourType = MobBehaviourType.None; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        this.building = BuildingManager.getBuilding(this.buildingUUID); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (this.contractUUID == 0) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            this.contract = null; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        else | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            this.contract = DbManager.ContractQueries.GET_CONTRACT(this.contractUUID); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        // Setup equipset for contract
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (this.contract != null) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            this.equipmentSetID = this.contract.getEquipmentSet(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (this.building != null) | 
					 | 
					 | 
					 | 
					        if (this.building != null) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            this.guild = this.building.getGuild(); | 
					 | 
					 | 
					 | 
					            this.guild = this.building.getGuild(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        else | 
					 | 
					 | 
					 | 
					        else | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -1596,7 +1587,7 @@ public class Mob extends AbstractIntelligenceAgent { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        // Don't override level for guard minions or pets
 | 
					 | 
					 | 
					 | 
					        // Don't override level for guard minions or pets
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if (this.contract == null) | 
					 | 
					 | 
					 | 
					        if (this.contract == null) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if (!this.agentType.equals(AIAgentType.GUARDCAPTAIN) && !this.agentType.equals(AIAgentType.PET)) | 
					 | 
					 | 
					 | 
					            if (!this.agentType.equals(AIAgentType.GUARDMINION) && !this.agentType.equals(AIAgentType.PET)) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                this.level = (short) this.mobBase.getLevel(); | 
					 | 
					 | 
					 | 
					                this.level = (short) this.mobBase.getLevel(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        //set bonuses
 | 
					 | 
					 | 
					 | 
					        //set bonuses
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |