mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2026-02-10 01:37:27 +08:00
[Bug fix][Enhance] Link Play Unlock Bug
- For Arcaea 6.12.0 - Support for "is_allow_marketing_email" - Support for config "LOG_FOLDER_PATH" (Thanks to PR #234) - Fix a bug about one song unlock bug in Link Play, due to wrong length of song unlock bytes.
This commit is contained in:
@@ -12,7 +12,7 @@ class Config:
|
||||
|
||||
SONG_FILE_HASH_PRE_CALCULATE = True
|
||||
|
||||
GAME_API_PREFIX = ['/autumntrain/37', '/'] # str | list[str]
|
||||
GAME_API_PREFIX = ['/apricotduck/38', '/'] # str | list[str]
|
||||
OLD_GAME_API_PREFIX = [] # str | list[str]
|
||||
|
||||
ALLOW_APPVERSION = [] # list[str]
|
||||
@@ -100,6 +100,7 @@ class Config:
|
||||
DATABASE_INIT_PATH = './database/init/'
|
||||
SQLITE_LOG_DATABASE_PATH = './database/arcaea_log.db'
|
||||
SQLITE_DATABASE_DELETED_PATH = './database/arcaea_database_deleted.db'
|
||||
LOG_FOLDER_PATH = './log/'
|
||||
|
||||
GAME_LOGIN_RATE_LIMIT = '30/5 minutes'
|
||||
API_LOGIN_RATE_LIMIT = '10/5 minutes'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from .config_manager import Config
|
||||
|
||||
ARCAEA_SERVER_VERSION = 'v2.12.1.7'
|
||||
ARCAEA_DATABASE_VERSION = 'v2.12.1.7'
|
||||
ARCAEA_SERVER_VERSION = 'v2.12.1.8'
|
||||
ARCAEA_DATABASE_VERSION = 'v2.12.1.8'
|
||||
ARCAEA_LOG_DATBASE_VERSION = 'v1.1'
|
||||
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ class User:
|
||||
self.world_rank_score: int = None
|
||||
self.ban_flag = None
|
||||
|
||||
self.is_allow_marketing_email = False
|
||||
|
||||
@property
|
||||
def hash_pwd(self) -> str:
|
||||
'''`password`的SHA-256值'''
|
||||
@@ -162,9 +164,9 @@ class UserRegister(User):
|
||||
self._insert_user_char()
|
||||
|
||||
self.c.execute('''insert into user(user_id, name, password, join_date, user_code, rating_ptt,
|
||||
character_id, is_skill_sealed, is_char_uncapped, is_char_uncapped_override, is_hide_rating, favorite_character, max_stamina_notification_enabled, current_map, ticket, prog_boost, email)
|
||||
values(:user_id, :name, :password, :join_date, :user_code, 0, 0, 0, 0, 0, 0, -1, 0, '', :memories, 0, :email)
|
||||
''', {'user_code': self.user_code, 'user_id': self.user_id, 'join_date': now, 'name': self.name, 'password': self.hash_pwd, 'memories': Config.DEFAULT_MEMORIES, 'email': self.email})
|
||||
character_id, is_skill_sealed, is_char_uncapped, is_char_uncapped_override, is_hide_rating, favorite_character, max_stamina_notification_enabled, current_map, ticket, prog_boost, email, is_allow_marketing_email)
|
||||
values(:user_id, :name, :password, :join_date, :user_code, 0, 0, 0, 0, 0, 0, -1, 0, '', :memories, 0, :email, :is_allow_marketing_email)
|
||||
''', {'user_code': self.user_code, 'user_id': self.user_id, 'join_date': now, 'name': self.name, 'password': self.hash_pwd, 'memories': Config.DEFAULT_MEMORIES, 'email': self.email, 'is_allow_marketing_email': self.is_allow_marketing_email})
|
||||
|
||||
|
||||
class UserLogin(User):
|
||||
@@ -520,6 +522,7 @@ class UserInfo(User):
|
||||
"is_hide_rating": self.is_hide_rating,
|
||||
"max_stamina_notification_enabled": self.max_stamina_notification_enabled,
|
||||
"mp_notification_enabled": self.mp_notification_enabled,
|
||||
"is_allow_marketing_email": self.is_allow_marketing_email,
|
||||
},
|
||||
"user_id": self.user_id,
|
||||
"name": self.name,
|
||||
@@ -567,7 +570,7 @@ class UserInfo(User):
|
||||
# }
|
||||
# ],
|
||||
|
||||
# has_email: True
|
||||
'has_email': self.email != '',
|
||||
}
|
||||
|
||||
def from_list(self, x: list) -> 'UserInfo':
|
||||
@@ -615,6 +618,7 @@ class UserInfo(User):
|
||||
self.insight_state = x[38]
|
||||
|
||||
self.custom_banner = x[39] if x[39] is not None else ''
|
||||
self.is_allow_marketing_email = x[40] == 1
|
||||
|
||||
return self
|
||||
|
||||
|
||||
Reference in New Issue
Block a user