mania hot fix
This commit is contained in:
parent
dcb4d3db8d
commit
fa11f5286a
|
@ -85,15 +85,25 @@ def getUserStatsRx(userID, gameMode):
|
|||
:return: dictionary with result
|
||||
"""
|
||||
modeForDB = gameModes.getGameModeForDB(gameMode)
|
||||
|
||||
# Get stats
|
||||
stats = glob.db.fetch("""SELECT
|
||||
ranked_score_{gm}_rx AS rankedScore,
|
||||
avg_accuracy_{gm}_rx AS accuracy,
|
||||
playcount_{gm}_rx AS playcount,
|
||||
total_score_{gm}_rx AS totalScore,
|
||||
pp_{gm}_rx AS pp
|
||||
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
|
||||
ranked_score_{gm}_rx AS rankedScore,
|
||||
avg_accuracy_{gm}_rx AS accuracy,
|
||||
playcount_{gm}_rx AS playcount,
|
||||
total_score_{gm}_rx AS totalScore,
|
||||
pp_{gm}_rx AS pp
|
||||
FROM users_stats WHERE id = %s LIMIT 1""".format(gm=modeForDB), [userID])
|
||||
|
||||
# Get game rank
|
||||
stats["gameRank"] = getGameRankRx(userID, gameMode)
|
||||
|
@ -111,13 +121,23 @@ def getUserStatsAp(userID, gameMode):
|
|||
"""
|
||||
modeForDB = gameModes.getGameModeForDB(gameMode)
|
||||
# Get stats
|
||||
stats = glob.db.fetch("""SELECT
|
||||
ranked_score_{gm}_ap AS rankedScore,
|
||||
avg_accuracy_{gm}_ap AS accuracy,
|
||||
playcount_{gm}_ap AS playcount,
|
||||
total_score_{gm}_ap AS totalScore,
|
||||
pp_{gm}_auto AS pp
|
||||
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,
|
||||
playcount_{gm}_ap AS playcount,
|
||||
total_score_{gm}_ap AS totalScore,
|
||||
pp_{gm}_auto AS pp
|
||||
FROM users_stats WHERE id = %s LIMIT 1""".format(gm=modeForDB), [userID])
|
||||
|
||||
# Get game rank
|
||||
stats["gameRank"] = getGameRankAp(userID, gameMode)
|
||||
|
|
Loading…
Reference in New Issue
Block a user