[Enhance] World rank score mechanism

- Adjust world rank mechanism to be closer to the official one.

Note: You need to refresh rating in web admin backend after updating, and the users need to get a better or new score to refresh world rank.
This commit is contained in:
Lost-MSth
2024-06-14 16:06:26 +08:00
parent 338f6579aa
commit 2a08c9cd14
11 changed files with 137 additions and 30 deletions

View File

@@ -106,6 +106,8 @@ def buy_special(user_id):
x.discount_from = -1
x.discount_to = -1
x.items = [ItemFactory(c).get_item(item_id)]
# request.form['ticket_used'] == 'true'
# memory_boost_ticket: x-1
x.buy()
r = {'user_id': x.user.user_id, 'ticket': x.user.ticket}