forked from MagicBane/Server
Rearrange logic
This commit is contained in:
@@ -301,18 +301,6 @@ public class City extends AbstractWorldObject {
|
||||
|
||||
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
|
||||
|
||||
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)) {
|
||||
|
||||
// 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) {
|
||||
cities.add(city);//can teleport to any open ToL that shares charter
|
||||
continue;
|
||||
@@ -343,26 +343,33 @@ public class City extends AbstractWorldObject {
|
||||
|
||||
// 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) {
|
||||
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)) {
|
||||
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)
|
||||
if (city.isNpc == 1 && city.isNoobIsle == 0 && playerCharacter.level >= 20) {
|
||||
cities.add(city); // Errants can travel everywhere off noob isle.
|
||||
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")) {
|
||||
|
||||
if (!repledge)
|
||||
if (!city.getGuild().charter.equals(playerCharacter.guild.charter))
|
||||
continue;
|
||||
|
||||
if (!city.getGuild().charter.canJoin(playerCharacter))
|
||||
continue;
|
||||
}
|
||||
|
||||
if (city.isNpc == 1)
|
||||
cities.add(city);
|
||||
}
|
||||
|
||||
return cities;
|
||||
|
||||
Reference in New Issue
Block a user