mania hot fix

This commit is contained in:
depreciate 2019-02-05 14:23:11 +10:30
parent dcb4d3db8d
commit fa11f5286a

View File

@ -85,6 +85,16 @@ def getUserStatsRx(userID, gameMode):
:return: dictionary with result
"""
modeForDB = gameModes.getGameModeForDB(gameMode)
if gameMode == 3:
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])
else:
# Get stats
stats = glob.db.fetch("""SELECT
@ -111,6 +121,16 @@ def getUserStatsAp(userID, gameMode):
"""
modeForDB = gameModes.getGameModeForDB(gameMode)
# Get stats
if gameMode == 3:
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])
else:
stats = glob.db.fetch("""SELECT
ranked_score_{gm}_ap AS rankedScore,
avg_accuracy_{gm}_ap AS accuracy,