forked from MagicBane/Server
More logic work
This commit is contained in:
@@ -344,29 +344,34 @@ 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;
|
||||
}
|
||||
|
||||
// Players cannot teleport to perdition or bastion
|
||||
|
||||
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")) {
|
||||
|
||||
if (!repledge)
|
||||
if (!city.getGuild().charter.equals(playerCharacter.guild.charter))
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user