Browse Source

More logic work

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

29
src/engine/objects/City.java

@ -344,31 +344,36 @@ public class City extends AbstractWorldObject { @@ -344,31 +344,36 @@ public class City extends AbstractWorldObject {
// Filter NPC cities
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
continue;
}
if (city.cityName.equals("Perdition") || city.cityName.equals("Bastion"))
continue; // cannot teleport to perdition or bastion
// Filter Lore cities
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
// Players cannot teleport to perdition or bastion
if (!repledge)
if (!city.getGuild().charter.equals(playerCharacter.guild.charter))
if (city.cityName.equals("Perdition") || city.cityName.equals("Bastion"))
continue;
if (repledge)
if (!city.getGuild().charter.canJoin(playerCharacter))
// These cities are available for anyone off noob island
if (playerCharacter.level >= 20 && (city.cityName.equals("Sea Dog's Rest") || city.cityName.equals("Khan'Ov Srekel") || city.cityName.equals("City of Khar Th'Sekt"))) {
cities.add(city);
continue;
}
if (city.isNpc == 1)
// Add Lore cities
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
if (repledge) {
if (city.getGuild().charter.canJoin(playerCharacter))
cities.add(city);
} else if (city.getGuild().charter.equals(playerCharacter.guild.charter))
cities.add(city);
}
}
return cities;
}

Loading…
Cancel
Save