Merge branch 'master' into MaybeFixResouceBundle
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Dieser Commit ist enthalten in:
Commit
080a9a9e34
@ -105,6 +105,8 @@ public class UserElo {
|
|||||||
return emblemCache.get(user.getId());
|
return emblemCache.get(user.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int maxEmblemProgression = 0;
|
||||||
|
int maxEloOfGameMode = 0;
|
||||||
int maxEloOfPlayer = 0;
|
int maxEloOfPlayer = 0;
|
||||||
ArenaMode arenaMode = null;
|
ArenaMode arenaMode = null;
|
||||||
for (ArenaMode mode : ArenaMode.getAllModes()) {
|
for (ArenaMode mode : ArenaMode.getAllModes()) {
|
||||||
@ -112,9 +114,15 @@ public class UserElo {
|
|||||||
if (UserElo.getFightsOfSeason(user.getId(), mode.getSchemType()) < 10) continue;
|
if (UserElo.getFightsOfSeason(user.getId(), mode.getSchemType()) < 10) continue;
|
||||||
|
|
||||||
Optional<Integer> currentElo = UserElo.getElo(user.getId(), mode.getSchemType());
|
Optional<Integer> currentElo = UserElo.getElo(user.getId(), mode.getSchemType());
|
||||||
if (currentElo.isPresent() && currentElo.get() > maxEloOfPlayer) {
|
if (currentElo.isPresent()) {
|
||||||
maxEloOfPlayer = currentElo.get();
|
int currentMaxEloOfGameMode = UserElo.getMaxElo(mode.getSchemType());
|
||||||
arenaMode = mode;
|
int progression = getProgression(currentElo.get(), currentMaxEloOfGameMode);
|
||||||
|
if (progression > maxEmblemProgression) {
|
||||||
|
maxEmblemProgression = progression;
|
||||||
|
maxEloOfGameMode = currentMaxEloOfGameMode;
|
||||||
|
maxEloOfPlayer = currentElo.get();
|
||||||
|
arenaMode = mode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,7 +130,6 @@ public class UserElo {
|
|||||||
emblemCache.put(user.getId(), "");
|
emblemCache.put(user.getId(), "");
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
int maxEloOfGameMode = UserElo.getMaxElo(arenaMode.getSchemType());
|
|
||||||
String emblem = getEmblem(maxEloOfPlayer, maxEloOfGameMode);
|
String emblem = getEmblem(maxEloOfPlayer, maxEloOfGameMode);
|
||||||
emblemCache.put(user.getId(), emblem);
|
emblemCache.put(user.getId(), emblem);
|
||||||
return emblem;
|
return emblem;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren