repledge work
This commit is contained in:
@@ -329,7 +329,6 @@ public class City extends AbstractWorldObject {
|
||||
}
|
||||
if (city.getGuild().getNation().equals(pc.guild.getNation())) {
|
||||
cities.add(city);//can always teleport inside your own nation
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -403,18 +402,18 @@ public class City extends AbstractWorldObject {
|
||||
|
||||
ConcurrentHashMap<Integer, AbstractGameObject> worldCities = DbManager.getMap(mbEnums.GameObjectType.City);
|
||||
if (ConfigManager.MB_RULESET.getValue().equals("LORE")) {
|
||||
//handle compiling of cities able to be teleported to for lore rule-set
|
||||
//handle compiling of cities able to be repledged to for lore rule-set
|
||||
for (AbstractGameObject ago : worldCities.values()) {
|
||||
City city = (City) ago;
|
||||
if (city.isNpc == 1 && city.getGuild().charter.equals(playerCharacter.guild.charter)) {
|
||||
if (city.isNpc == 1 && city.getGuild().charter.canJoin(playerCharacter)) {
|
||||
cities.add(city); // anyone of the same charter can teleport to a safehold of that charter
|
||||
continue;
|
||||
} else if (city.isNoobIsle == 1 && playerCharacter.level <= 20) {
|
||||
cities.add(city); // everyone can go to noob island if they are under level 20
|
||||
continue;
|
||||
}else if (city.isOpen() && city.getTOL().rank > 4 && city.getGuild().charter.equals(playerCharacter.guild.charter))
|
||||
} else if (city.isOpen() && city.getTOL().rank > 4 && city.getGuild().charter.canJoin(playerCharacter))
|
||||
if (!city.getTOL().reverseKOS) {
|
||||
cities.add(city);//can teleport to any open ToL that shares charter
|
||||
cities.add(city);//can repledge to any open ToL that player can fit into charter
|
||||
continue;
|
||||
} else {
|
||||
if (city.getTOL().getCondemned().contains(playerCharacter.objectUUID) && city.getTOL().getCondemned().get(playerCharacter.objectUUID).active) {
|
||||
@@ -429,11 +428,10 @@ public class City extends AbstractWorldObject {
|
||||
cities.add(city);//this nation is allowed for the reverse KOS
|
||||
continue;
|
||||
}
|
||||
if (city.getGuild().getNation().equals(playerCharacter.guild.getNation())) {
|
||||
cities.add(city);//can always repledge inside your own nation
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (city.getGuild().getNation().equals(playerCharacter.guild.getNation())) {
|
||||
cities.add(city);//can always teleport inside your own nation
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//add npc cities
|
||||
|
||||
Reference in New Issue
Block a user