mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2026-02-13 11:47:32 +08:00
Fix two small bugs
- Fix a bug that something of the finale challenge cannot be unlocked - Fix a bug that the users' items will not be zero, which will disturb some purchase operations
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
from .error import NoData
|
from .error import NoData
|
||||||
from .song import Chart
|
|
||||||
from .item import ItemFactory
|
from .item import ItemFactory
|
||||||
|
from .song import Chart
|
||||||
|
|
||||||
|
|
||||||
class CourseChart(Chart):
|
class CourseChart(Chart):
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class UserItem(Item):
|
|||||||
(self.user.user_id, self.item_id, self.item_type))
|
(self.user.user_id, self.item_id, self.item_type))
|
||||||
x = self.c.fetchone()
|
x = self.c.fetchone()
|
||||||
if x:
|
if x:
|
||||||
self.amount = x[0] if x[0] else 1
|
self.amount = x[0] if x[0] is not None else 1
|
||||||
else:
|
else:
|
||||||
self.amount = 0
|
self.amount = 0
|
||||||
|
|
||||||
|
|||||||
@@ -222,6 +222,7 @@ class UserPlay(UserScore):
|
|||||||
else:
|
else:
|
||||||
r = {}
|
r = {}
|
||||||
r['user_rating'] = self.user.rating_ptt
|
r['user_rating'] = self.user.rating_ptt
|
||||||
|
r['finale_challenge_higher'] = self.rating > self.ptt.value
|
||||||
r['global_rank'] = self.user.global_rank
|
r['global_rank'] = self.user.global_rank
|
||||||
r['finale_play_value'] = 0 # emmmm
|
r['finale_play_value'] = 0 # emmmm
|
||||||
return r
|
return r
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
flask>=2.0
|
flask>=2.0.2
|
||||||
cryptography
|
cryptography
|
||||||
|
|||||||
Reference in New Issue
Block a user