From 1f8c5495ab0377428df95b78edd3f2dee23e90ad Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 14 May 2024 19:28:19 -0500 Subject: [PATCH] repledge work --- src/engine/objects/City.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/engine/objects/City.java b/src/engine/objects/City.java index be003fe6..a27b3e4f 100644 --- a/src/engine/objects/City.java +++ b/src/engine/objects/City.java @@ -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 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