1
0
mirror of synced 2024-11-27 23:50:47 +01:00

sdvx: new skill analyzer results should not overwrite better old ones.

This commit is contained in:
RinChanNOWWW 2022-02-16 10:47:02 +08:00 committed by Jennifer Taylor
parent 5d8ec0527c
commit 90f3d9e138
3 changed files with 15 additions and 0 deletions

View File

@ -501,6 +501,11 @@ class SoundVoltexGravityWars(
achievement_rate = request.child_value('ar')
season_id = request.child_value('ssnid')
# Do not update the course achievement when old achievement rate is greater.
old = self.data.local.user.get_achievement(self.game, self.version, userid, (season_id * 100) + course_id, 'course')
if old is not None and old.get_int('achievement_rate') > achievement_rate:
return Node.void('game_3')
self.data.local.user.put_achievement(
self.game,
self.version,

View File

@ -3818,6 +3818,11 @@ class SoundVoltexHeavenlyHaven(
grade = request.child_value('gr')
score = request.child_value('sc')
# Do not update the course achievement when old score is greater.
old = self.data.local.user.get_achievement(self.game, self.version, userid, (season_id * 100) + course_id, 'course')
if old is not None and old.get_int('score') > score:
return Node.void('game')
self.data.local.user.put_achievement(
self.game,
self.version,

View File

@ -2195,6 +2195,11 @@ class SoundVoltexInfiniteInfection(
achievement_rate = request.child_value('ar')
season_id = request.child_value('ssnid')
# Do not update the course achievement when old achievement rate is greater.
old = self.data.local.user.get_achievement(self.game, self.version, userid, (season_id * 100) + course_id, 'course')
if old is not None and old.get_int('achievement_rate') > achievement_rate:
return Node.void('game_2')
self.data.local.user.put_achievement(
self.game,
self.version,