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 8 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 {
if (sourceGuild.equals(targetGuild)) if (sourceGuild.equals(targetGuild))
return true; 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 //target must be GL or IC
if (GuildStatusController.isInnerCouncil(target.getGuildStatus()) == false && GuildStatusController.isGuildLeader(target.getGuildStatus()) == false) { if (GuildStatusController.isInnerCouncil(target.getGuildStatus()) == false && GuildStatusController.isGuildLeader(target.getGuildStatus()) == false) {

Loading…
Cancel
Save