Browse Source

reverse KOS function completed

postwipe-teleporting
FatBoy-DOTC 6 months ago
parent
commit
0d24789a93
  1. 20
      src/engine/objects/City.java

20
src/engine/objects/City.java

@ -306,7 +306,19 @@ public class City extends AbstractWorldObject { @@ -306,7 +306,19 @@ public class City extends AbstractWorldObject {
if (city.parentZone == null)
continue;
if (city.parentZone.guild_zone && city.isOpen() && city.getTOL().rank > 4) {
if(repledge && city.getGuild().equals(playerCharacter.guild)){
//can't repledge to a guild you're already part of
continue;
}
if (city.parentZone.guild_zone) {
if(city.getGuild().getNation().equals(playerCharacter.guild.getNation())){
//players can all port and repledge inside their own nation
cities.add(city);
continue;
}
if (city.isOpen() && city.getTOL().rank > 4) {
// Filter Lore cities
@ -315,8 +327,7 @@ public class City extends AbstractWorldObject { @@ -315,8 +327,7 @@ public class City extends AbstractWorldObject {
if (!repledge)
if (!city.getGuild().charter.equals(playerCharacter.guild.charter))
continue;
else
if (!city.getGuild().charter.canJoin(playerCharacter))
else if (!city.getGuild().charter.canJoin(playerCharacter))
continue;
}
Integer playerUUID = playerCharacter.objectUUID;
@ -355,6 +366,7 @@ public class City extends AbstractWorldObject { @@ -355,6 +366,7 @@ public class City extends AbstractWorldObject {
continue;
}
}
} else {
// Filter NPC cities
@ -390,7 +402,7 @@ public class City extends AbstractWorldObject { @@ -390,7 +402,7 @@ public class City extends AbstractWorldObject {
}
}
}
return cities;
}

Loading…
Cancel
Save