[Bug fix] Link Play song idx too big error

- Fix a bug that if song's idx is too big, the server will catch the error, which makes Link Play cannot work.
- For Arcaea 6.4.0/1
This commit is contained in:
Lost-MSth
2025-04-24 23:56:59 +08:00
parent c4da67cd94
commit a3bc071416
4 changed files with 23 additions and 3 deletions

View File

@@ -23,6 +23,8 @@ def get_song_unlock(client_song_map: 'dict[str, list]') -> bytes:
if not v[i]:
continue
index = int(k) * 5 + i
if index >= Constant.LINKPLAY_UNLOCK_LENGTH * 8:
continue
user_song_unlock[index // 8] |= 1 << (index % 8)
return bytes(user_song_unlock)