Fix/add MVP system for Win Effects

This commit is contained in:
Spencer 2017-11-25 14:17:34 -05:00 committed by Alexander Meech
parent 8a669ccebe
commit a3a76bc1f9

View File

@ -1520,10 +1520,25 @@ public abstract class Game extends ListenerComponent implements Lifetimed
{
List<Player> teamList = new ArrayList<>();
List<Player> otherList = new ArrayList<>();
HashMap<Player, Integer> teamGemCount = new HashMap<>();
teamList.addAll(team.GetPlacements(true).stream()
.distinct()
.filter((p) -> !getArcadeManager().isVanished(p))
.peek((p) ->
{
Map<String, GemData> gemDataMap = GetGems(p);
int gemCount = 0;
for (GemData data : gemDataMap.values())
{
gemCount += data.Gems;
}
teamGemCount.put(p, gemCount);
})
.sorted((p1, p2) -> teamGemCount.get(p2) - teamGemCount.get(p1))
.collect(Collectors.toList()));
otherList.addAll(UtilServer.getPlayersCollection()