catch weird city null error

This commit is contained in:
2025-02-12 17:14:04 -06:00
parent 8c5b1d56c2
commit bee91a6aa7
+8 -2
View File
@@ -395,8 +395,14 @@ public class City extends AbstractWorldObject {
//open city, just list
if (city.open && city.getTOL() != null && city.getTOL().getRank() > 4) {
cities.add(city);
}else if(city.getGuild().getNation().equals(pc.guild.getNation())){
cities.add(city);
}else {
try {
if (city.getGuild().getNation().equals(pc.guild.getNation())) {
cities.add(city);
}
}catch(Exception e){
Logger.error(e);
}
}
}
} else if (city.isNpc == 1) {