From 3b88a8012c76af12360d218eaee7f9db114cb934 Mon Sep 17 00:00:00 2001 From: kuroppoi <68156848+kuroppoi@users.noreply.github.com> Date: Wed, 5 Jan 2022 00:18:12 +0100 Subject: [PATCH] Generate spawn buildings before other structures --- .../brainwine/gameserver/zone/gen/StructureGenerator.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gameserver/src/main/java/brainwine/gameserver/zone/gen/StructureGenerator.java b/gameserver/src/main/java/brainwine/gameserver/zone/gen/StructureGenerator.java index bd97ac2..b6522cc 100644 --- a/gameserver/src/main/java/brainwine/gameserver/zone/gen/StructureGenerator.java +++ b/gameserver/src/main/java/brainwine/gameserver/zone/gen/StructureGenerator.java @@ -26,6 +26,9 @@ public class StructureGenerator implements GeneratorTask { public void generate(GeneratorContext ctx) { int width = ctx.getWidth(); int height = ctx.getHeight(); + placeRandomSpawnTower(ctx, (int)(width * 0.2)); + placeRandomSpawnTower(ctx, (int)(width * 0.5)); + placeRandomSpawnTower(ctx, (int)(width * 0.8)); for(Prefab structure : uniqueStructures) { int x = ctx.nextInt(width - 2) + 1; @@ -53,10 +56,6 @@ public class StructureGenerator implements GeneratorTask { } } } - - placeRandomSpawnTower(ctx, (int)(width * 0.2)); - placeRandomSpawnTower(ctx, (int)(width * 0.5)); - placeRandomSpawnTower(ctx, (int)(width * 0.8)); } private void placeRandomSpawnTower(GeneratorContext ctx, int x) {