mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2026-02-08 16:57:26 +08:00
[Enhance][Bug fix] ETR world score & Finale & Bundle Update Message
- Start to consider the ETR scores when getting the sum of all scores in global ranking. - Add support for automatically adding partner "Hikari & Tairitsu (Reunion)" and "Hikari (Fatalis)", to try to unlock Finale stories correctly. #110 #164 - Fix a bug that the POST requests will be neglected if a new content bundle update exists.
This commit is contained in:
@@ -110,7 +110,7 @@ def header_check(request) -> ArcError:
|
||||
if Config.ALLOW_APPVERSION: # 版本检查
|
||||
if 'AppVersion' not in headers or headers['AppVersion'] not in Config.ALLOW_APPVERSION:
|
||||
return LowVersion('Invalid app version', 5)
|
||||
if 'ContentBundle' in headers and headers['ContentBundle'] != BundleParser.max_bundle_version.get(headers.get('AppVersion', ''), '0.0.0'):
|
||||
if request.method == 'GET' and 'ContentBundle' in headers and headers['ContentBundle'] != BundleParser.max_bundle_version.get(headers.get('AppVersion', ''), '0.0.0'):
|
||||
return LowVersion('Invalid content bundle version', 11)
|
||||
|
||||
if has_arc_hash and not ArcHashChecker(request).check():
|
||||
|
||||
@@ -7,6 +7,7 @@ from werkzeug.datastructures import ImmutableMultiDict
|
||||
from core.bundle import BundleDownload
|
||||
from core.download import DownloadList
|
||||
from core.error import RateLimit
|
||||
from core.item import ItemCharacter
|
||||
from core.sql import Connect
|
||||
from core.system import GameInfo
|
||||
from core.user import UserOnline
|
||||
@@ -14,7 +15,7 @@ from core.user import UserOnline
|
||||
from .auth import auth_required
|
||||
from .func import arc_try, error_return, success_return
|
||||
from .present import present_info
|
||||
from .purchase import bundle_bundle, get_single, bundle_pack
|
||||
from .purchase import bundle_bundle, bundle_pack, get_single
|
||||
from .score import song_score_friend
|
||||
from .user import user_me
|
||||
from .world import world_all
|
||||
@@ -65,15 +66,29 @@ def finale_progress():
|
||||
|
||||
|
||||
@bp.route('/finale/finale_start', methods=['POST'])
|
||||
def finale_start():
|
||||
@auth_required(request)
|
||||
@arc_try
|
||||
def finale_start(user_id):
|
||||
# testify开始,对立再见
|
||||
# 没数据
|
||||
return success_return({})
|
||||
# 但是对立不再见
|
||||
|
||||
with Connect() as c:
|
||||
item = ItemCharacter(c)
|
||||
item.set_id('55') # Hikari (Fatalis)
|
||||
item.user_claim_item(UserOnline(c, user_id))
|
||||
return success_return({})
|
||||
|
||||
|
||||
@bp.route('/finale/finale_end', methods=['POST'])
|
||||
def finale_end():
|
||||
return success_return({})
|
||||
@auth_required(request)
|
||||
@arc_try
|
||||
def finale_end(user_id):
|
||||
|
||||
with Connect() as c:
|
||||
item = ItemCharacter(c)
|
||||
item.set_id('5') # Hikari & Tairitsu (Reunion)
|
||||
item.user_claim_item(UserOnline(c, user_id))
|
||||
return success_return({})
|
||||
|
||||
|
||||
@bp.route('/applog/me/log', methods=['POST'])
|
||||
|
||||
Reference in New Issue
Block a user