Browse Source

disable teleports to cities that are destroyed or errant

magicbox-1.5.2.1
FatBoy-DOTC 1 week ago
parent
commit
e5b2247204
  1. 16
      src/engine/objects/City.java

16
src/engine/objects/City.java

@ -306,8 +306,22 @@ public class City extends AbstractWorldObject {
if (city.parentZone == null) if (city.parentZone == null)
continue; continue;
//can't repledge to a guild you're already part of // Can't teleport to something without a tree
if (city.getTOL() == null)
continue;
// No abandoned cities
if (city.getTOL().getGuild().isEmptyGuild())
continue;
// No destroyed cities
if (city.getTOL().getRank() == -1)
continue;
//can't repledge to a guild you're already part of
if (repledge && city.getGuild().equals(playerCharacter.guild)) if (repledge && city.getGuild().equals(playerCharacter.guild))
continue; continue;

Loading…
Cancel
Save