Browse Source

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
lakebane-master
fatboy 7 months ago
parent
commit
360a393a0f
  1. 15
      src/engine/net/client/handlers/InviteToSubHandler.java

15
src/engine/net/client/handlers/InviteToSubHandler.java

@ -95,6 +95,21 @@ public class InviteToSubHandler extends AbstractClientMsgHandler { @@ -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) {

Loading…
Cancel
Save