[Enhance][Bug Fix]

- For Arcaea 5.10.4
- Add support for the Link Play notification setting.
- Fix a bug that public rooms cannot be matched possibly if some players leave the room.
- Continue to fix the bug that the player cannot complete one course twice.
- Continue to fix the bug that users cannot change online settings.
This commit is contained in:
Lost-MSth
2024-09-27 00:28:56 +08:00
parent c52fda6f47
commit dc1ca344e5
10 changed files with 49 additions and 33 deletions

View File

@@ -320,12 +320,17 @@ class MatchStore:
# 加入已有房间
for i in MatchStore.room_cache:
f = True
num = 0
for j in i['players']:
if j['player_id'] != 0 and abs(user.rating_ptt - j['rating_ptt']) >= ptt_abs:
f = False
break
if j['player_id'] != 0:
num += 1
if abs(user.rating_ptt - j['rating_ptt']) >= ptt_abs:
f = False
break
if f and user.calc_available_chart_num(b64decode(i['song_unlock'])) >= unlock_min and ((time() + 2) * 1000000 < i['next_state_timestamp'] or i['next_state_timestamp'] <= 0):
# 有玩家非正常退房时next_state_timestamp 不为 0有概率新玩家进不来所以使用 num 统计玩家数量
if f and user.calc_available_chart_num(b64decode(i['song_unlock'])) >= unlock_min and ((time() + 2) * 1000000 < i['next_state_timestamp'] or i['next_state_timestamp'] <= 0 or num == 1):
room = Room()
room.room_code = i['room_code']
user.c = self.c