Browse Source

More logic work

postwipe-guilds
MagicBot 6 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 {
// Filter NPC cities // 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 cities.add(city); // everyone can go to noob island if they are under level 20
continue; continue;
} }
if (city.cityName.equals("Perdition") || city.cityName.equals("Bastion")) // Players cannot teleport to perdition or bastion
continue; // cannot teleport to perdition or bastion
// Filter Lore cities
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
if (!repledge) if (city.cityName.equals("Perdition") || city.cityName.equals("Bastion"))
if (!city.getGuild().charter.equals(playerCharacter.guild.charter))
continue; continue;
if (repledge) // These cities are available for anyone off noob island
if (!city.getGuild().charter.canJoin(playerCharacter))
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; 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); cities.add(city);
} }
}
return cities; return cities;
} }

Loading…
Cancel
Save