Browse Source

siege engineer can be slotted in siege tents

lakebane-recovery
FatBoy-DOTC 4 days ago
parent
commit
e2854b3e86
  1. 3
      src/engine/mobileAI/MobHandlers/SiegeHandler.java
  2. 3
      src/engine/objects/Contract.java

3
src/engine/mobileAI/MobHandlers/SiegeHandler.java

@ -8,6 +8,7 @@ import engine.mobileAI.utilities.MovementUtilities;
import engine.objects.Building; import engine.objects.Building;
import engine.objects.City; import engine.objects.City;
import engine.objects.Mob; import engine.objects.Mob;
import engine.server.MBServerStatics;
public class SiegeHandler { public class SiegeHandler {
public static void run(Mob engine){ public static void run(Mob engine){
@ -30,7 +31,7 @@ public class SiegeHandler {
if(!engine.despawned) { if(!engine.despawned) {
engine.despawn(); engine.despawn();
}else{ }else{
if(engine.deathTime + (engine.spawnTime * 1000) > System.currentTimeMillis()){ if(engine.deathTime + MBServerStatics.FIFTEEN_MINUTES > System.currentTimeMillis()){
engine.respawn(); engine.respawn();
} }
} }

3
src/engine/objects/Contract.java

@ -737,6 +737,9 @@ public class Contract extends AbstractGameObject {
if (this.allowedBuildings.size() == 0) if (this.allowedBuildings.size() == 0)
return false; return false;
if(this.name.equals("Siege Engineer") && building.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.SIEGETENT))
return true;
// Binary match // Binary match
return (building.getBlueprint().getBuildingGroup().elementOf(this.allowedBuildings)); return (building.getBlueprint().getBuildingGroup().elementOf(this.allowedBuildings));
} }

Loading…
Cancel
Save