From e2854b3e86145968cd5b372704c79fb45c007ebd Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 30 Mar 2025 08:24:13 -0500 Subject: [PATCH] siege engineer can be slotted in siege tents --- src/engine/mobileAI/MobHandlers/SiegeHandler.java | 3 ++- src/engine/objects/Contract.java | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/engine/mobileAI/MobHandlers/SiegeHandler.java b/src/engine/mobileAI/MobHandlers/SiegeHandler.java index e1ca82f1..385f660a 100644 --- a/src/engine/mobileAI/MobHandlers/SiegeHandler.java +++ b/src/engine/mobileAI/MobHandlers/SiegeHandler.java @@ -8,6 +8,7 @@ import engine.mobileAI.utilities.MovementUtilities; import engine.objects.Building; import engine.objects.City; import engine.objects.Mob; +import engine.server.MBServerStatics; public class SiegeHandler { public static void run(Mob engine){ @@ -30,7 +31,7 @@ public class SiegeHandler { if(!engine.despawned) { engine.despawn(); }else{ - if(engine.deathTime + (engine.spawnTime * 1000) > System.currentTimeMillis()){ + if(engine.deathTime + MBServerStatics.FIFTEEN_MINUTES > System.currentTimeMillis()){ engine.respawn(); } } diff --git a/src/engine/objects/Contract.java b/src/engine/objects/Contract.java index 09d554b2..1a1f1c02 100644 --- a/src/engine/objects/Contract.java +++ b/src/engine/objects/Contract.java @@ -737,6 +737,9 @@ public class Contract extends AbstractGameObject { if (this.allowedBuildings.size() == 0) return false; + if(this.name.equals("Siege Engineer") && building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.SIEGETENT)) + return true; + // Binary match return (building.getBlueprint().getBuildingGroup().elementOf(this.allowedBuildings)); }