From 19f4d987acf73c8b2e8ff848f2b3dc9126954a54 Mon Sep 17 00:00:00 2001 From: depreciate Date: Tue, 5 Feb 2019 11:38:42 +1030 Subject: [PATCH] ? --- ripple/userUtils.py | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/ripple/userUtils.py b/ripple/userUtils.py index dcc34ac..37b1990 100644 --- a/ripple/userUtils.py +++ b/ripple/userUtils.py @@ -85,19 +85,6 @@ def getUserStatsRx(userID, gameMode): :return: dictionary with result """ modeForDB = gameModes.getGameModeForDB(gameMode) - if gameMode == 3: - - # Get stats - stats = glob.db.fetch("""SELECT - ranked_score_{gm} AS rankedScore, - avg_accuracy_{gm} AS accuracy, - playcount_{gm} AS playcount, - total_score_{gm} AS totalScore, - pp_{gm} AS pp - FROM users_stats WHERE id = %s LIMIT 1""".format(gm=modeForDB), [userID]) - - # Get game rank - else: # Get stats stats = glob.db.fetch("""SELECT ranked_score_{gm}_rx AS rankedScore, @@ -122,21 +109,8 @@ def getUserStatsAp(userID, gameMode): :return: dictionary with result """ modeForDB = gameModes.getGameModeForDB(gameMode) - if gameMode == 3: - - # Get stats - stats = glob.db.fetch("""SELECT - ranked_score_{gm} AS rankedScore, - avg_accuracy_{gm} AS accuracy, - playcount_{gm} AS playcount, - total_score_{gm} AS totalScore, - pp_{gm} AS pp - FROM users_stats WHERE id = %s LIMIT 1""".format(gm=modeForDB), [userID]) - - # Get game rank - else: # Get stats - stats = glob.db.fetch("""SELECT + stats = glob.db.fetch("""SELECT ranked_score_{gm}_ap AS rankedScore, avg_accuracy_{gm}_ap AS accuracy, playcount_{gm}_ap AS playcount,