mirror of https://github.com/hykilpikonna/AquaDX
[DIVA] Ignore personal high score update when using rgo option or no fail mode
parent
8d3d40f838
commit
9712946688
|
@ -69,12 +69,18 @@ public class StageResultHandler extends BaseHandler {
|
||||||
PlayerPvRecord record = pvRecordRepository.findByPdIdAndPvIdAndEditionAndDifficulty(profile, log.getPvId(), log.getEdition(), log.getDifficulty())
|
PlayerPvRecord record = pvRecordRepository.findByPdIdAndPvIdAndEditionAndDifficulty(profile, log.getPvId(), log.getEdition(), log.getDifficulty())
|
||||||
.orElseGet(() -> new PlayerPvRecord(profile, log.getPvId(), log.getEdition(), log.getDifficulty()));
|
.orElseGet(() -> new PlayerPvRecord(profile, log.getPvId(), log.getEdition(), log.getDifficulty()));
|
||||||
|
|
||||||
// Update pvRecord field
|
// Not save personal record in no fail mode
|
||||||
record.setMaxScore(Math.max(record.getMaxScore(), log.getScore()));
|
if(request.getGame_type() != 1) {
|
||||||
record.setMaxAttain(Math.max(record.getMaxAttain(), log.getAttainPoint()));
|
// Only update personal record when using rhythm game option
|
||||||
|
if (log.getRhythmGameOptions().equals("0,0,0")) {
|
||||||
|
// Update pvRecord field
|
||||||
|
record.setMaxScore(Math.max(record.getMaxScore(), log.getScore()));
|
||||||
|
record.setMaxAttain(Math.max(record.getMaxAttain(), log.getAttainPoint()));
|
||||||
|
|
||||||
if (record.getResult().getValue() < log.getClearResult().getValue()) {
|
if (record.getResult().getValue() < log.getClearResult().getValue()) {
|
||||||
record.setResult(log.getClearResult());
|
record.setResult(log.getClearResult());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] updateRgo = log.getRhythmGameOptions().split(",");
|
String[] updateRgo = log.getRhythmGameOptions().split(",");
|
||||||
|
|
Loading…
Reference in New Issue