|
|
@ -318,6 +318,7 @@ public class City extends AbstractWorldObject { |
|
|
|
cities.add(city); |
|
|
|
cities.add(city); |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (city.isOpen() && city.getTOL().rank > 4) { |
|
|
|
if (city.isOpen() && city.getTOL().rank > 4) { |
|
|
|
|
|
|
|
|
|
|
|
// Filter Lore cities
|
|
|
|
// Filter Lore cities
|
|
|
@ -330,41 +331,37 @@ public class City extends AbstractWorldObject { |
|
|
|
else if (!city.getGuild().charter.canJoin(playerCharacter)) |
|
|
|
else if (!city.getGuild().charter.canJoin(playerCharacter)) |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Integer playerUUID = playerCharacter.objectUUID; |
|
|
|
Integer playerUUID = playerCharacter.objectUUID; |
|
|
|
Integer guildUUID = playerCharacter.guildUUID; |
|
|
|
Integer guildUUID = playerCharacter.guildUUID; |
|
|
|
Integer nationUUID = playerCharacter.guild.getNation().getObjectUUID(); |
|
|
|
Integer nationUUID = playerCharacter.guild.getNation().getObjectUUID(); |
|
|
|
boolean allowed = false; |
|
|
|
boolean allowed = false; |
|
|
|
|
|
|
|
|
|
|
|
if (city.getTOL().reverseKOS) { |
|
|
|
if (city.getTOL().reverseKOS) { |
|
|
|
|
|
|
|
|
|
|
|
//reverse KOS, specific values are allowed
|
|
|
|
//reverse KOS, specific values are allowed
|
|
|
|
if (city.getTOL().getCondemned().contains(playerUUID) && city.getTOL().getCondemned().get(playerUUID).active) { |
|
|
|
|
|
|
|
//individual is cleared for teleport/repledge
|
|
|
|
if ((city.getTOL().getCondemned().containsKey(playerUUID) && city.getTOL().getCondemned().get(playerUUID).active) || |
|
|
|
allowed = true; |
|
|
|
(city.getTOL().getCondemned().containsKey(guildUUID) && city.getTOL().getCondemned().get(guildUUID).active) || |
|
|
|
} else if (city.getTOL().getCondemned().contains(guildUUID) && city.getTOL().getCondemned().get(guildUUID).active) { |
|
|
|
(city.getTOL().getCondemned().containsKey(nationUUID) && city.getTOL().getCondemned().get(nationUUID).active)) |
|
|
|
//player guild is cleared for teleport/repledge
|
|
|
|
|
|
|
|
allowed = true; |
|
|
|
|
|
|
|
} else if (city.getTOL().getCondemned().contains(nationUUID) && city.getTOL().getCondemned().get(nationUUID).active) { |
|
|
|
|
|
|
|
//player nation is cleared for teleport/repledge
|
|
|
|
|
|
|
|
allowed = true; |
|
|
|
allowed = true; |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
//not reverse KOS, everyone is allowed by default
|
|
|
|
//not reverse KOS, everyone is allowed by default
|
|
|
|
|
|
|
|
|
|
|
|
allowed = true; |
|
|
|
allowed = true; |
|
|
|
|
|
|
|
|
|
|
|
//specific values are not allowed
|
|
|
|
//specific values are not allowed
|
|
|
|
if (city.getTOL().getCondemned().contains(playerUUID) && city.getTOL().getCondemned().get(playerUUID).active) { |
|
|
|
|
|
|
|
//individual is cleared for teleport/repledge
|
|
|
|
if ((city.getTOL().getCondemned().containsKey(playerUUID) && city.getTOL().getCondemned().get(playerUUID).active) || |
|
|
|
allowed = false; |
|
|
|
(city.getTOL().getCondemned().containsKey(guildUUID) && city.getTOL().getCondemned().get(guildUUID).active) || |
|
|
|
} else if (city.getTOL().getCondemned().contains(guildUUID) && city.getTOL().getCondemned().get(guildUUID).active) { |
|
|
|
(city.getTOL().getCondemned().containsKey(nationUUID) && city.getTOL().getCondemned().get(nationUUID).active)) |
|
|
|
//player guild is cleared for teleport/repledge
|
|
|
|
|
|
|
|
allowed = false; |
|
|
|
|
|
|
|
} else if (city.getTOL().getCondemned().contains(nationUUID) && city.getTOL().getCondemned().get(nationUUID).active) { |
|
|
|
|
|
|
|
//player nation is cleared for teleport/repledge
|
|
|
|
|
|
|
|
allowed = false; |
|
|
|
allowed = false; |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (allowed) { |
|
|
|
if (allowed) |
|
|
|
cities.add(city); |
|
|
|
cities.add(city); |
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
|
|