Forgot to update ranks
This commit is contained in:
parent
53c06bd94f
commit
9f388f032c
|
@ -185,6 +185,7 @@ type modeData struct {
|
||||||
GlobalLeaderboardRank *int `json:"global_leaderboard_rank"`
|
GlobalLeaderboardRank *int `json:"global_leaderboard_rank"`
|
||||||
CountryLeaderboardRank *int `json:"country_leaderboard_rank"`
|
CountryLeaderboardRank *int `json:"country_leaderboard_rank"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type userFullResponse struct {
|
type userFullResponse struct {
|
||||||
common.ResponseBase
|
common.ResponseBase
|
||||||
userData
|
userData
|
||||||
|
@ -201,6 +202,7 @@ type userFullResponse struct {
|
||||||
BanDate *common.UnixTimestamp `json:"ban_date,omitempty"`
|
BanDate *common.UnixTimestamp `json:"ban_date,omitempty"`
|
||||||
Email string `json:"email,omitempty"`
|
Email string `json:"email,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type silenceInfo struct {
|
type silenceInfo struct {
|
||||||
Reason string `json:"reason"`
|
Reason string `json:"reason"`
|
||||||
End common.UnixTimestamp `json:"end"`
|
End common.UnixTimestamp `json:"end"`
|
||||||
|
@ -373,7 +375,7 @@ WHERE ` + whereClause + ` AND ` + md.User.OnlyUserPublic(true) + `
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
`
|
`
|
||||||
// Fuck.
|
// Fuck.
|
||||||
r := userFullResponse{}
|
r := userFullResponseRx{}
|
||||||
var (
|
var (
|
||||||
b singleBadge
|
b singleBadge
|
||||||
can bool
|
can bool
|
||||||
|
@ -422,10 +424,10 @@ LIMIT 1
|
||||||
for modeID, m := range [...]*modeData{&r.STD, &r.Taiko, &r.CTB, &r.Mania} {
|
for modeID, m := range [...]*modeData{&r.STD, &r.Taiko, &r.CTB, &r.Mania} {
|
||||||
m.Level = ocl.GetLevelPrecise(int64(m.TotalScore))
|
m.Level = ocl.GetLevelPrecise(int64(m.TotalScore))
|
||||||
|
|
||||||
if i := leaderboardPosition(md.R, modesToReadable[modeID], r.ID); i != nil {
|
if i := leaderboardPositionRx(md.R, modesToReadable[modeID], r.ID); i != nil {
|
||||||
m.GlobalLeaderboardRank = i
|
m.GlobalLeaderboardRank = i
|
||||||
}
|
}
|
||||||
if i := countryPosition(md.R, modesToReadable[modeID], r.ID, r.Country); i != nil {
|
if i := countryPositionRx(md.R, modesToReadable[modeID], r.ID, r.Country); i != nil {
|
||||||
m.CountryLeaderboardRank = i
|
m.CountryLeaderboardRank = i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -471,15 +473,15 @@ SELECT
|
||||||
users_stats.custom_badge_icon, users_stats.custom_badge_name, users_stats.can_custom_badge,
|
users_stats.custom_badge_icon, users_stats.custom_badge_name, users_stats.can_custom_badge,
|
||||||
users_stats.show_custom_badge,
|
users_stats.show_custom_badge,
|
||||||
|
|
||||||
users_stats.ranked_score_std_ap, users_stats.total_score_std_ap, users_stats.playcount_std_ap,
|
users_stats.ranked_score_std_ap, users_stats.total_score_std, users_stats.playcount_std_ap,
|
||||||
users_stats.replays_watched_std, users_stats.total_hits_std,
|
users_stats.replays_watched_std, users_stats.total_hits_std,
|
||||||
users_stats.avg_accuracy_std_ap, users_stats.pp_std_auto,
|
users_stats.avg_accuracy_std_ap, users_stats.pp_std_auto,
|
||||||
|
|
||||||
users_stats.ranked_score_taiko_ap, users_stats.total_score_taiko_ap, users_stats.playcount_taiko_ap,
|
users_stats.ranked_score_taiko_ap, users_stats.total_score_taiko, users_stats.playcount_taiko_ap,
|
||||||
users_stats.replays_watched_taiko, users_stats.total_hits_taiko,
|
users_stats.replays_watched_taiko, users_stats.total_hits_taiko,
|
||||||
users_stats.avg_accuracy_taiko_ap, users_stats.pp_taiko_auto,
|
users_stats.avg_accuracy_taiko_ap, users_stats.pp_taiko_auto,
|
||||||
|
|
||||||
users_stats.ranked_score_ctb_ap, users_stats.total_score_ctb_ap, users_stats.playcount_ctb_ap,
|
users_stats.ranked_score_ctb_ap, users_stats.total_score_ctb, users_stats.playcount_ctb_ap,
|
||||||
users_stats.replays_watched_ctb, users_stats.total_hits_ctb,
|
users_stats.replays_watched_ctb, users_stats.total_hits_ctb,
|
||||||
users_stats.avg_accuracy_ctb_ap, users_stats.pp_ctb_auto,
|
users_stats.avg_accuracy_ctb_ap, users_stats.pp_ctb_auto,
|
||||||
|
|
||||||
|
@ -497,7 +499,7 @@ WHERE ` + whereClause + ` AND ` + md.User.OnlyUserPublic(true) + `
|
||||||
LIMIT 1
|
LIMIT 1
|
||||||
`
|
`
|
||||||
// Fuck.
|
// Fuck.
|
||||||
r := userFullResponse{}
|
r := userFullResponseAp{}
|
||||||
var (
|
var (
|
||||||
b singleBadge
|
b singleBadge
|
||||||
can bool
|
can bool
|
||||||
|
@ -546,10 +548,10 @@ LIMIT 1
|
||||||
for modeID, m := range [...]*modeData{&r.STD, &r.Taiko, &r.CTB, &r.Mania} {
|
for modeID, m := range [...]*modeData{&r.STD, &r.Taiko, &r.CTB, &r.Mania} {
|
||||||
m.Level = ocl.GetLevelPrecise(int64(m.TotalScore))
|
m.Level = ocl.GetLevelPrecise(int64(m.TotalScore))
|
||||||
|
|
||||||
if i := leaderboardPosition(md.R, modesToReadable[modeID], r.ID); i != nil {
|
if i := leaderboardPositionAp(md.R, modesToReadable[modeID], r.ID); i != nil {
|
||||||
m.GlobalLeaderboardRank = i
|
m.GlobalLeaderboardRank = i
|
||||||
}
|
}
|
||||||
if i := countryPosition(md.R, modesToReadable[modeID], r.ID, r.Country); i != nil {
|
if i := countryPositionAp(md.R, modesToReadable[modeID], r.ID, r.Country); i != nil {
|
||||||
m.CountryLeaderboardRank = i
|
m.CountryLeaderboardRank = i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user