|
|
@ -695,8 +695,10 @@ public class Mine extends AbstractGameObject { |
|
|
|
// ***For debugging
|
|
|
|
// ***For debugging
|
|
|
|
// Logger.info("PlayerMemory for ", this.getCityName() + ": " + _playerMemory.size());
|
|
|
|
// Logger.info("PlayerMemory for ", this.getCityName() + ": " + _playerMemory.size());
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
boolean updated = false; |
|
|
|
try { |
|
|
|
try { |
|
|
|
onExitZerg(currentPlayers); |
|
|
|
//updated = onExitZerg(currentPlayers);
|
|
|
|
|
|
|
|
updated = onExit(currentPlayers); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
Logger.error(e.getMessage()); |
|
|
|
Logger.error(e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
@ -737,7 +739,23 @@ public class Mine extends AbstractGameObject { |
|
|
|
} |
|
|
|
} |
|
|
|
//}
|
|
|
|
//}
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private Boolean onExit(HashSet<AbstractWorldObject> currentPlayers){ |
|
|
|
|
|
|
|
ArrayList<Integer> purge = new ArrayList<>(); |
|
|
|
|
|
|
|
for(int id : this._playerMemory){ |
|
|
|
|
|
|
|
PlayerCharacter player = PlayerCharacter.getPlayerCharacter(id); |
|
|
|
|
|
|
|
if(currentPlayers.contains(player) == false){ |
|
|
|
|
|
|
|
purge.add(id); |
|
|
|
|
|
|
|
player.ZergMultiplier = 1.0f; |
|
|
|
|
|
|
|
ChatManager.chatSystemInfo(player,"Left Mine, Multiplier: " + player.ZergMultiplier); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(purge.size() > 0) { |
|
|
|
|
|
|
|
this._playerMemory.removeAll(purge); |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} else{ |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
private Boolean onExitZerg(HashSet<AbstractWorldObject> currentPlayers) { |
|
|
|
private Boolean onExitZerg(HashSet<AbstractWorldObject> currentPlayers) { |
|
|
|
|
|
|
|
|
|
|
|
PlayerCharacter player; |
|
|
|
PlayerCharacter player; |
|
|
@ -774,6 +792,9 @@ public class Mine extends AbstractGameObject { |
|
|
|
} |
|
|
|
} |
|
|
|
for(Integer id : purge){ |
|
|
|
for(Integer id : purge){ |
|
|
|
this._recentMemory.remove(id); |
|
|
|
this._recentMemory.remove(id); |
|
|
|
|
|
|
|
this._playerMemory.remove(id); |
|
|
|
|
|
|
|
PlayerCharacter.getPlayerCharacter(playerUUID).mineAppliedID = 0; |
|
|
|
|
|
|
|
PlayerCharacter.getPlayerCharacter(playerUUID).ZergMultiplier = 1.0f; |
|
|
|
} |
|
|
|
} |
|
|
|
if(toRemove.isEmpty()){ |
|
|
|
if(toRemove.isEmpty()){ |
|
|
|
return false; |
|
|
|
return false; |
|
|
|