This commit is contained in:
depreciate 2019-02-11 22:00:57 +10:30
parent 410499ce79
commit 62b887edb0

View File

@ -1,4 +1,4 @@
from objects import score from objects import rxscore
from common.ripple import userUtils from common.ripple import userUtils
from constants import rankedStatuses from constants import rankedStatuses
from common.constants import mods as modsEnum from common.constants import mods as modsEnum
@ -92,7 +92,7 @@ class scoreboard:
isPremium = userUtils.getPrivileges(self.userID) & privileges.USER_PREMIUM isPremium = userUtils.getPrivileges(self.userID) & privileges.USER_PREMIUM
# Output our personal best if found # Output our personal best if found
if personalBestScoreID is not None: if personalBestScoreID is not None:
s = score.score(personalBestScoreID) s = rxscore.score(personalBestScoreID)
self.scores[0] = s self.scores[0] = s
else: else:
# No personal best # No personal best
@ -120,7 +120,10 @@ class scoreboard:
else: else:
friends = "" friends = ""
order = "ORDER BY pp DESC" if self.beatmap.rankedStatus == rankedStatuses.LOVED:
order = "ORDER BY score DESC"
else:
order = "ORDER BY pp DESC"
if isPremium: # Premium members can see up to 100 scores on leaderboards if isPremium: # Premium members can see up to 100 scores on leaderboards
limit = "LIMIT 100" limit = "LIMIT 100"
@ -138,7 +141,7 @@ class scoreboard:
if topScores is not None: if topScores is not None:
for topScore in topScores: for topScore in topScores:
# Create score object # Create score object
s = score.score(topScore["id"], setData=False) s = rxscore.score(topScore["id"], setData=False)
# Set data and rank from topScores's row # Set data and rank from topScores's row
s.setDataFromDict(topScore) s.setDataFromDict(topScore)