|
|
@ -303,30 +303,13 @@ public class City extends AbstractWorldObject { |
|
|
|
|
|
|
|
|
|
|
|
City city = (City) ago; |
|
|
|
City city = (City) ago; |
|
|
|
|
|
|
|
|
|
|
|
if (city.cityName.equals("Perdition") || city.cityName.equals("Bastion")) |
|
|
|
// Filter Player cities
|
|
|
|
continue; // cannot teleport to perdition or bastion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (city.isNoobIsle == 1 && playerCharacter.level <= 20) { |
|
|
|
|
|
|
|
cities.add(city); // everyone can go to noob island if they are under level 20
|
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (city.cityName.equals("Khan'Ov Srekel")) { |
|
|
|
|
|
|
|
cities.add(city); //everyone anytime can teleport to khan
|
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (city.isNpc == 1 && city.getGuild().charter.equals(playerCharacter.guild.charter)) { |
|
|
|
if (city.parentZone == null) |
|
|
|
cities.add(city); // anyone of the same charter can teleport to a safehold of that charter
|
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (playerCharacter.guild.isEmptyGuild() && city.isNpc == 1 && city.isNoobIsle == 0 && playerCharacter.level >= 20) { |
|
|
|
|
|
|
|
cities.add(city); // Errants can travel everywhere off noob isle.
|
|
|
|
|
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
if (city.isOpen() && city.getTOL().rank > 4 && city.getGuild().charter.equals(playerCharacter.guild.charter)) { |
|
|
|
if (city.parentZone.guild_zone && city.isOpen() && city.getTOL().rank > 4 && city.getGuild().charter.equals(playerCharacter.guild.charter)) { |
|
|
|
|
|
|
|
|
|
|
|
if (!city.getTOL().reverseKOS) { |
|
|
|
if (!city.getTOL().reverseKOS) { |
|
|
|
cities.add(city);//can teleport to any open ToL that shares charter
|
|
|
|
cities.add(city);//can teleport to any open ToL that shares charter
|
|
|
@ -343,69 +326,37 @@ public class City extends AbstractWorldObject { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (city.getTOL().getCondemned().containsKey(playerCharacter.guild.getNation().getObjectUUID()) && city.getTOL().getCondemned().get(playerCharacter.guild.getNation().getObjectUUID()).active) |
|
|
|
if (city.getTOL().getCondemned().containsKey(playerCharacter.guild.getNation().getObjectUUID()) && city.getTOL().getCondemned().get(playerCharacter.guild.getNation().getObjectUUID()).active) { |
|
|
|
cities.add(city);//this nation is allowed for the reverse KOS
|
|
|
|
cities.add(city);//this nation is allowed for the reverse KOS
|
|
|
|
|
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return cities; |
|
|
|
// Filter NPC cities
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Guild guild = playerCharacter.getGuild(); |
|
|
|
|
|
|
|
//add npc cities
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (AbstractGameObject ago : worldCities.values()) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ago.getObjectType().equals(GameObjectType.City)) { |
|
|
|
if (city.cityName.equals("Perdition") || city.cityName.equals("Bastion")) |
|
|
|
City city = (City) ago; |
|
|
|
continue; // cannot teleport to perdition or bastion
|
|
|
|
|
|
|
|
|
|
|
|
if (city.noTeleport) |
|
|
|
if (city.isNoobIsle == 1 && playerCharacter.level <= 20) { |
|
|
|
|
|
|
|
cities.add(city); // everyone can go to noob island if they are under level 20
|
|
|
|
continue; |
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
if (city.parentZone != null && city.parentZone.guild_zone) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (playerCharacter.getAccount().status.equals(AccountStatus.ADMIN)) { |
|
|
|
|
|
|
|
cities.add(city); |
|
|
|
|
|
|
|
} else |
|
|
|
|
|
|
|
//list Player cities
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//open city, just list
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (city.open && city.getTOL() != null && city.getTOL().getRank() > 4) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!BuildingManager.IsPlayerHostile(city.getTOL(), playerCharacter)) { |
|
|
|
|
|
|
|
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) { |
|
|
|
|
|
|
|
if (city.getGuild().getGuildType().equals(playerCharacter.guild.getGuildType())) { |
|
|
|
|
|
|
|
cities.add(city); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
cities.add(city); //verify nation or guild is same
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} else if (Guild.sameNationExcludeErrant(city.getGuild(), guild)) |
|
|
|
|
|
|
|
cities.add(city); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (city.isNpc == 1) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//list NPC cities
|
|
|
|
if (city.cityName.equals("Khan'Ov Srekel")) { |
|
|
|
|
|
|
|
cities.add(city); //everyone anytime can teleport to khan
|
|
|
|
Guild g = city.getGuild(); |
|
|
|
continue; |
|
|
|
if (g == null) { |
|
|
|
} |
|
|
|
if (city.isNpc == 1) |
|
|
|
|
|
|
|
if (city.isNoobIsle == 1) { |
|
|
|
|
|
|
|
if (playerCharacter.getLevel() < 21) |
|
|
|
|
|
|
|
cities.add(city); //verify nation or guild is same
|
|
|
|
|
|
|
|
} else if (playerCharacter.getLevel() > 9) |
|
|
|
|
|
|
|
cities.add(city); //verify nation or guild is same
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (playerCharacter.getLevel() >= g.getTeleportMin() && playerCharacter.getLevel() <= g.getTeleportMax()) |
|
|
|
if (city.isNpc == 1 && city.getGuild().charter.equals(playerCharacter.guild.charter)) { |
|
|
|
cities.add(city); //verify nation or guild is same
|
|
|
|
cities.add(city); // anyone of the same charter can teleport to a safehold of that charter
|
|
|
|
|
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (city.isNpc == 1 && city.isNoobIsle == 0 && playerCharacter.level >= 20) |
|
|
|
|
|
|
|
cities.add(city); // Errants can travel everywhere off noob isle.
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return cities; |
|
|
|
return cities; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|