From e4c65439630c0df81ccaa59000d9fe6bfeb3bff0 Mon Sep 17 00:00:00 2001 From: Josh Smith Date: Mon, 18 Feb 2019 07:06:17 -0500 Subject: [PATCH] dsfdswf --- objects/rxscore.pyx | 10 ++++++---- objects/score.pyx | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/objects/rxscore.pyx b/objects/rxscore.pyx index 80f5152..3f1b39c 100644 --- a/objects/rxscore.pyx +++ b/objects/rxscore.pyx @@ -206,18 +206,20 @@ class score: self.rank, self.date) - def setCompletedStatus(self): + def setCompletedStatus(self, b = None): """ Set this score completed status and rankedScoreIncrease """ self.completed = 0 + + # Create beatmap object + if b is None: + b = beatmap.beatmap(self.fileMd5, 0) + if self.passed == True and scoreUtils.isRankable(self.mods): # Get userID userID = userUtils.getID(self.playerName) - # Create beatmap object - b = beatmap.beatmap(self.fileMd5, 0) - # Make sure we don't have another score identical to this one duplicate = glob.db.fetch("SELECT id FROM scores_relax WHERE userid = %s AND beatmap_md5 = %s AND play_mode = %s AND time = %s AND score = %s LIMIT 1", [userID, self.fileMd5, self.gameMode, self.date, self.score]) if duplicate is not None: diff --git a/objects/score.pyx b/objects/score.pyx index 3a51173..48033c4 100644 --- a/objects/score.pyx +++ b/objects/score.pyx @@ -205,18 +205,20 @@ class score: self.rank, self.date) - def setCompletedStatus(self): + def setCompletedStatus(self, b = None): """ Set this score completed status and rankedScoreIncrease """ self.completed = 0 + + # Create beatmap object + if b is None: + b = beatmap.beatmap(self.fileMd5, 0) + if self.passed == True and scoreUtils.isRankable(self.mods): # Get userID userID = userUtils.getID(self.playerName) - # Create beatmap object - b = beatmap.beatmap(self.fileMd5, 0) - # Make sure we don't have another score identical to this one duplicate = glob.db.fetch("SELECT id FROM scores WHERE userid = %s AND beatmap_md5 = %s AND play_mode = %s AND score = %s LIMIT 1", [userID, self.fileMd5, self.gameMode, self.score]) if duplicate is not None: