sdvx: new skill analyzer results should not overwrite better old ones.
This commit is contained in:
parent
5d8ec0527c
commit
90f3d9e138
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user