From f4bd9287965894e0de633f9ce2ce228a90a28cfa Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 28 Apr 2024 11:34:03 -0500 Subject: [PATCH] Lore check for telport and repledge --- src/engine/objects/City.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/engine/objects/City.java b/src/engine/objects/City.java index ce946486..51e38acc 100644 --- a/src/engine/objects/City.java +++ b/src/engine/objects/City.java @@ -343,9 +343,17 @@ public class City extends AbstractWorldObject { if (city.isNpc == 1) if (city.isNoobIsle == 1) { if (pc.getLevel() < 21) - cities.add(city); + if (ConfigManager.MB_RULESET.getValue() == "LORE" && city.getGuild().getGuildType().canJoin(pc)) { + cities.add(city); + } else { + cities.add(city); //verify nation or guild is same + } } else if (pc.getLevel() > 9) - cities.add(city); + if (ConfigManager.MB_RULESET.getValue() == "LORE" && city.getGuild().getGuildType().canJoin(pc)) { + cities.add(city); + } else { + cities.add(city); //verify nation or guild is same + } } else if (pc.getLevel() >= g.getTeleportMin() && pc.getLevel() <= g.getTeleportMax()) if (ConfigManager.MB_RULESET.getValue() == "LORE") { @@ -407,7 +415,11 @@ public class City extends AbstractWorldObject { if (city.isNpc == 1) if (city.isNoobIsle == 1) { if (playerCharacter.getLevel() < 21) - cities.add(city); //verify nation or guild is same + if (ConfigManager.MB_RULESET.getValue() == "LORE" && city.getGuild().getGuildType().canJoin(playerCharacter)) { + cities.add(city); + } else { + cities.add(city); //verify nation or guild is same + } } else if (playerCharacter.getLevel() > 9) if (ConfigManager.MB_RULESET.getValue() == "LORE") { if (city.getGuild().getGuildType().equals(playerCharacter.guild.getGuildType())) {