mine teleportation disabled for 5 minutes after window closes
This commit is contained in:
@@ -69,6 +69,8 @@ public class Mine extends AbstractGameObject {
|
||||
|
||||
public ZergTracker zergTracker;
|
||||
|
||||
public Long allowed_teleport_time;
|
||||
|
||||
/**
|
||||
* ResultSet Constructor
|
||||
*/
|
||||
@@ -133,6 +135,7 @@ public class Mine extends AbstractGameObject {
|
||||
tower.setMaxHitPoints(5000f * this.capSize);
|
||||
tower.setCurrentHitPoints(tower.healthMax);
|
||||
}
|
||||
this.allowed_teleport_time = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
public static void releaseMineClaims(PlayerCharacter playerCharacter) {
|
||||
@@ -341,7 +344,7 @@ public class Mine extends AbstractGameObject {
|
||||
public static ArrayList<Mine> getMinesToTeleportTo(PlayerCharacter player) {
|
||||
ArrayList<Mine> mines = new ArrayList<>();
|
||||
for(Mine mine : Mine.getMines())
|
||||
if(!mine.isActive)
|
||||
if(!mine.isActive && System.currentTimeMillis() > mine.allowed_teleport_time)
|
||||
if(mine.getOwningGuild() != null)
|
||||
if(mine.getOwningGuild().getNation().equals(player.getGuild().getNation()))
|
||||
if(!mine.getOwningGuild().equals(Guild.getErrantGuild()))
|
||||
@@ -427,6 +430,7 @@ public class Mine extends AbstractGameObject {
|
||||
//something went wrong resetting zerg multiplier, maybe player was deleted?
|
||||
}
|
||||
}
|
||||
this.allowed_teleport_time = System.currentTimeMillis() + MBServerStatics.FIVE_MINUTES;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user