Browse Source

Rearrange logic

postwipe-guilds
MagicBot 5 months ago
parent
commit
d32818f351
  1. 51
      src/engine/objects/City.java

51
src/engine/objects/City.java

@ -301,18 +301,6 @@ public class City extends AbstractWorldObject {
City city = (City) ago; City city = (City) ago;
// Filter Lore cities
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
if (!repledge)
if (!city.getGuild().charter.equals(playerCharacter.guild.charter))
continue;
if (!city.getGuild().charter.canJoin(playerCharacter))
continue;
}
// Filter Player cities // Filter Player cities
if (city.parentZone == null) if (city.parentZone == null)
@ -320,6 +308,18 @@ public class City extends AbstractWorldObject {
if (city.parentZone.guild_zone && 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)) {
// Filter Lore cities
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
if (!repledge)
if (!city.getGuild().charter.equals(playerCharacter.guild.charter))
continue;
if (!city.getGuild().charter.canJoin(playerCharacter))
continue;
}
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
continue; continue;
@ -343,26 +343,33 @@ public class City extends AbstractWorldObject {
// Filter NPC cities // Filter NPC cities
if (city.cityName.equals("Perdition") || city.cityName.equals("Bastion"))
continue; // cannot teleport to perdition or bastion
if (city.isNoobIsle == 1 && playerCharacter.level <= 20) { if (city.isNoobIsle == 1 && playerCharacter.level <= 20) {
cities.add(city); // everyone can go to noob island if they are under level 20 cities.add(city); // everyone can go to noob island if they are under level 20
continue; continue;
} }
if (city.cityName.equals("Khan'Ov Srekel")) { if (city.isNpc == 1 && city.isNoobIsle == 0 && playerCharacter.level >= 20) {
cities.add(city); //everyone anytime can teleport to khan cities.add(city); // Errants can travel everywhere off noob isle.
continue; continue;
} }
if (city.isNpc == 1 && city.getGuild().charter.equals(playerCharacter.guild.charter)) { if (city.cityName.equals("Perdition") || city.cityName.equals("Bastion"))
cities.add(city); // anyone of the same charter can teleport to a safehold of that charter continue; // cannot teleport to perdition or bastion
continue;
// Filter Lore cities
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
if (!repledge)
if (!city.getGuild().charter.equals(playerCharacter.guild.charter))
continue;
if (!city.getGuild().charter.canJoin(playerCharacter))
continue;
} }
if (city.isNpc == 1 && city.isNoobIsle == 0 && playerCharacter.level >= 20) if (city.isNpc == 1)
cities.add(city); // Errants can travel everywhere off noob isle. cities.add(city);
} }
return cities; return cities;

Loading…
Cancel
Save