From 360a393a0fbf29becc5bd8a6745174fedc9eb027 Mon Sep 17 00:00:00 2001 From: fatboy Date: Thu, 18 Apr 2024 12:48:04 -0500 Subject: [PATCH] cannot invite guilds to sub if you are baned cannot invite guilds to sub if any tree in your nation has a bane on it cannot be subbed if you have a bane placed on you --- .../net/client/handlers/InviteToSubHandler.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/engine/net/client/handlers/InviteToSubHandler.java b/src/engine/net/client/handlers/InviteToSubHandler.java index bab06111..70171c73 100644 --- a/src/engine/net/client/handlers/InviteToSubHandler.java +++ b/src/engine/net/client/handlers/InviteToSubHandler.java @@ -95,6 +95,21 @@ public class InviteToSubHandler extends AbstractClientMsgHandler { if (sourceGuild.equals(targetGuild)) return true; + if(sourceGuild.getNation().getOwnedCity().getBane() != null) + return true; // cannot invite guilds to sub if you are baned + + if(sourceGuild.getNation().getSubGuildList() != null){ + for(Guild subGuild : sourceGuild.getNation().getSubGuildList()){ + if(subGuild.getOwnedCity() != null) + if(subGuild.getOwnedCity().getBane() != null) + return true;//cannot invite guilds to sub if any tree in your nation has a bane on it + } + } + + if(targetGuild.getOwnedCity() != null) + if(targetGuild.getOwnedCity().getBane() != null) + return true; // cannot be subbed if you have a bane placed on you + //target must be GL or IC if (GuildStatusController.isInnerCouncil(target.getGuildStatus()) == false && GuildStatusController.isGuildLeader(target.getGuildStatus()) == false) {