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) {