Browse Source

bane mechanic complete - working

lakebane2
FatBoy-DOTC 2 weeks ago
parent
commit
afa68b840c
  1. 6
      src/engine/objects/City.java

6
src/engine/objects/City.java

@ -1062,14 +1062,12 @@ public class City extends AbstractWorldObject { @@ -1062,14 +1062,12 @@ public class City extends AbstractWorldObject {
}
private void onExitBane() {
Iterator<Integer> iterator = this.baneAttendees.keySet().iterator();
ArrayList<Integer> toRemove = new ArrayList<>();
while (iterator.hasNext()) {
Integer uuid = iterator.next();
for (Integer uuid : this.baneAttendees.keySet()) {
if (!_playerMemory.contains(uuid)) {
long timeGone = System.currentTimeMillis() - this.baneAttendees.get(uuid).longValue();
if (timeGone > 180000L) { // 3 minutes
toRemove.add(uuid);
toRemove.add(uuid); // Mark for removal
}
}
}

Loading…
Cancel
Save