From e79da635562432b02a0ff838e4bf28235a2c5630 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 24 Jun 2024 03:18:59 -0400 Subject: [PATCH] Method cleanup. --- src/engine/objects/City.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/engine/objects/City.java b/src/engine/objects/City.java index 1b9c438e..386e14c9 100644 --- a/src/engine/objects/City.java +++ b/src/engine/objects/City.java @@ -306,15 +306,16 @@ public class City extends AbstractWorldObject { if (city.parentZone == null) continue; - if(repledge && city.getGuild().equals(playerCharacter.guild)){ - //can't repledge to a guild you're already part of + //can't repledge to a guild you're already part of + + if (repledge && city.getGuild().equals(playerCharacter.guild)) continue; - } if (city.parentZone.guild_zone) { + //players can all port and repledge inside their own nation + if(city.getGuild().getNation().equals(playerCharacter.guild.getNation())){ - //players can all port and repledge inside their own nation cities.add(city); continue; } @@ -325,10 +326,10 @@ public class City extends AbstractWorldObject { if (ConfigManager.MB_RULESET.getValue().equals("LORE")) { - if (!repledge) - if (!city.getGuild().charter.equals(playerCharacter.guild.charter)) + if (repledge) { + if (!city.getGuild().charter.canJoin(playerCharacter)) continue; - else if (!city.getGuild().charter.canJoin(playerCharacter)) + } else if (!city.getGuild().charter.equals(playerCharacter.guild.charter)) continue; }