|
|
|
@ -3,6 +3,8 @@ import engine.InterestManagement.WorldGrid;
@@ -3,6 +3,8 @@ import engine.InterestManagement.WorldGrid;
|
|
|
|
|
import engine.objects.*; |
|
|
|
|
import engine.server.MBServerStatics; |
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
|
|
public class ZergManager { |
|
|
|
|
|
|
|
|
|
public static float getCurrentMultiplier(int count, int maxCount){ |
|
|
|
@ -210,8 +212,8 @@ public class ZergManager {
@@ -210,8 +212,8 @@ public class ZergManager {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void PrintDetailsToClient(PlayerCharacter pc){ |
|
|
|
|
String outstring = "ZERG MANAGER DETAILS FOR: " + pc.getFirstName(); |
|
|
|
|
String newline = "\r\n "; |
|
|
|
|
String outstring = newline + "ZERG MANAGER DETAILS FOR: " + pc.getFirstName() + newline; |
|
|
|
|
Mine attended = null; |
|
|
|
|
for(Mine mine : Mine.getMines()){ |
|
|
|
|
Building tower = BuildingManager.getBuilding(mine.getBuildingID()); |
|
|
|
@ -225,24 +227,47 @@ public class ZergManager {
@@ -225,24 +227,47 @@ public class ZergManager {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(attended != null){ |
|
|
|
|
outstring += "Mine Cap: " + attended.capSize; |
|
|
|
|
outstring += "Mine Cap: " + attended.capSize + newline; |
|
|
|
|
Building tower = BuildingManager.getBuilding(attended.getBuildingID()); |
|
|
|
|
if(tower == null) |
|
|
|
|
return; |
|
|
|
|
int count = 1; |
|
|
|
|
for(AbstractWorldObject awo : WorldGrid.getObjectsInRangePartial(tower.loc,MBServerStatics.CHARACTER_LOAD_RANGE * 3,MBServerStatics.MASK_PLAYER)){ |
|
|
|
|
PlayerCharacter player = (PlayerCharacter)awo; |
|
|
|
|
if(player.equals(pc)) |
|
|
|
|
continue; |
|
|
|
|
if(player.guild.getNation().equals(pc.guild.getNation())) |
|
|
|
|
count ++; |
|
|
|
|
|
|
|
|
|
int count = 0; |
|
|
|
|
ArrayList<PlayerCharacter> stillPresent = new ArrayList<>(); |
|
|
|
|
ArrayList<PlayerCharacter> gonePlayers = new ArrayList<>(); |
|
|
|
|
for(Integer countedID : attended.mineAttendees.keySet()){ |
|
|
|
|
PlayerCharacter counted = PlayerCharacter.getFromCache(countedID); |
|
|
|
|
if(counted != null){ |
|
|
|
|
if(counted.guild.getNation().equals(pc.guild.getNation())) { |
|
|
|
|
Long timeGone = System.currentTimeMillis() - attended.mineAttendees.get(countedID); |
|
|
|
|
if(timeGone > 5000){ |
|
|
|
|
//outstring += counted.getFirstName() + " GONE FOR: " + timeGone/1000 + " SECONDS" + newline;
|
|
|
|
|
gonePlayers.add(counted); |
|
|
|
|
}else{ |
|
|
|
|
//outstring += counted.getFirstName() + " STILL PRESENT" + newline;
|
|
|
|
|
stillPresent.add(counted); |
|
|
|
|
} |
|
|
|
|
count ++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
outstring += newline + "TOTAL NATION MEMBERS COUNTED: " + count + newline; |
|
|
|
|
outstring += newline + "PLAYERS PRESENT:" + newline; |
|
|
|
|
for(PlayerCharacter present : stillPresent){ |
|
|
|
|
outstring += present.getFirstName() + newline; |
|
|
|
|
} |
|
|
|
|
outstring += newline + "PLAYERS GONE:" + newline; |
|
|
|
|
for(PlayerCharacter gone : gonePlayers){ |
|
|
|
|
Long timeGone = System.currentTimeMillis() - attended.mineAttendees.get(gone.getObjectUUID()); |
|
|
|
|
if(timeGone > 5000) { |
|
|
|
|
outstring += gone.getFirstName() + " GONE FOR: " + timeGone / 1000 + " SECONDS" + newline; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
outstring += "Nation Members Present " + count; |
|
|
|
|
}else{ |
|
|
|
|
outstring += "Mine: Not Within Mine Distance"; |
|
|
|
|
outstring += "Mine: Not Within Mine Distance" + newline; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
outstring += "Zerg Multiplier: " + pc.ZergMultiplier; |
|
|
|
|
outstring += newline + "Zerg Multiplier: " + pc.ZergMultiplier + newline; |
|
|
|
|
|
|
|
|
|
ChatManager.chatSystemInfo(pc, outstring); |
|
|
|
|
} |
|
|
|
|