Browse Source

zerg mechanic work

lakebane-master
FatBoy-DOTC 8 months ago
parent
commit
e4bad5f418
  1. 15
      src/engine/workthreads/ZergMechanicThread.java

15
src/engine/workthreads/ZergMechanicThread.java

@ -34,6 +34,7 @@ import static engine.server.MBServerStatics.MINE_LATE_WINDOW; @@ -34,6 +34,7 @@ import static engine.server.MBServerStatics.MINE_LATE_WINDOW;
public class ZergMechanicThread implements Runnable {
public Bane bane = null;
public Mine mine = null;
public ArrayList<PlayerCharacter> affectedPlayers = new ArrayList<>();
public ZergMechanicThread(Bane b, Mine m) {
this.mine = m;
@ -64,6 +65,10 @@ public Mine mine = null; @@ -64,6 +65,10 @@ public Mine mine = null;
continue;
player = (PlayerCharacter) playerObject;
if(!this.affectedPlayers.contains(player))
this.affectedPlayers.add(player);
//ChatManager.chatSystemInfo(player, "TESTING ZERG MECHANIC");
if (mine._recentMemory.containsKey(player.getObjectUUID()))
mine._recentMemory.remove(player.getObjectUUID());
@ -118,6 +123,9 @@ public Mine mine = null; @@ -118,6 +123,9 @@ public Mine mine = null;
}
}
}
for(PlayerCharacter player : this.affectedPlayers)
player.ZergMultiplier = 1.0f;
}
public void RunBaneMechanic(){
@ -133,6 +141,10 @@ public Mine mine = null; @@ -133,6 +141,10 @@ public Mine mine = null;
ArrayList<PlayerCharacter> defenders = new ArrayList<>();
for (AbstractWorldObject awo : currentPlayers) {
if(!this.affectedPlayers.contains((PlayerCharacter)awo))
this.affectedPlayers.add((PlayerCharacter)awo);
PlayerCharacter pc = (PlayerCharacter) awo;
if (!pc.getGuild().getNation().equals(attacker) && !pc.getGuild().getNation().equals(defender)) {
pc.teleport(pc.bindLoc);
@ -164,6 +176,9 @@ public Mine mine = null; @@ -164,6 +176,9 @@ public Mine mine = null;
}
}
}
for(PlayerCharacter player : this.affectedPlayers)
player.ZergMultiplier = 1.0f;
}
public static void startZergThreadMine(Mine mine) {

Loading…
Cancel
Save