From d8f1cf20872c81f229790bbd5171a449a7975cd6 Mon Sep 17 00:00:00 2001 From: fatboy Date: Thu, 18 Apr 2024 13:07:47 -0500 Subject: [PATCH] cleanup --- src/engine/objects/Bane.java | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/engine/objects/Bane.java b/src/engine/objects/Bane.java index d158ff6f..2be53ca0 100644 --- a/src/engine/objects/Bane.java +++ b/src/engine/objects/Bane.java @@ -209,6 +209,22 @@ public final class Bane { return false; } + for(Guild subGuild : baningGuild.getNation().getSubGuildList()) { + if (getBaneByAttackerGuild(subGuild) != null) { + PlaceAssetMsg.sendPlaceAssetError(player.getClientConnection(), 1, "Your Nation Already Has a Bane Placed"); + return false; + } + } + if(targetCity.getGuild().getNation().getSubGuildList() != null) { + + for (Guild subGuild : targetCity.getGuild().getNation().getSubGuildList()) { + if (getBaneByAttackerGuild(subGuild) != null) { + PlaceAssetMsg.sendPlaceAssetError(player.getClientConnection(), 1, "This Nation Already Has a Bane Placed On It"); + return false; + } + } + } + Blueprint blueprint = Blueprint.getBlueprint(24300); // Banestone //Let's drop a banestone! @@ -225,21 +241,7 @@ public final class Bane { return false; } - for(Guild subGuild : baningGuild.getNation().getSubGuildList()) { - if (getBaneByAttackerGuild(subGuild) != null) { - PlaceAssetMsg.sendPlaceAssetError(player.getClientConnection(), 1, "Your Nation Already Has a Bane Placed"); - return false; - } - } - if(targetCity.getGuild().getNation().getSubGuildList() != null) { - for (Guild subGuild : targetCity.getGuild().getNation().getSubGuildList()) { - if (getBaneByAttackerGuild(subGuild) != null) { - PlaceAssetMsg.sendPlaceAssetError(player.getClientConnection(), 1, "This Nation Already Has a Bane Placed On It"); - return false; - } - } - } stone.addEffectBit((1 << 19)); stone.setMaxHitPoints(stone.getBlueprint().getMaxHealth(stone.getRank())); stone.setCurrentHitPoints(stone.getMaxHitPoints());