fix: UpsertUserAll 因 playSpecial 越界被服务器 500 拒绝

calcRandom() 移植的是 C# 里声明为 int 的 32 位比特反转,`<<=` 溢出按二进制
补码环绕,结果恒为合法 signed int32(高位被置起时为负)。Dart 的 int 是 64 位
且被反转值恒正,于是约一半概率产出 [2^31, 2^32) 的正数(如 3212134032),超出
UserGamePlaylog.playSpecial 的 int 声明,服务器整个 body 反序列化失败返回
HTTP 500,表现为解锁歌曲/获取收藏品不可用。按 C# 位模式重解释为 signed 32 位。

同时补上 userPlaylogList 缺少的 extBool3(UserPlaylog.cs:337 声明的 bool)。
This commit is contained in:
Cookiues committed 2026-09-25 23:06:37 +08:00
1 parent 79fa0d7a20
commit ebd1fdddaa
3 files changed
+21 -1

No files matched your search

@@ -260,6 +260,7 @@ class UserAllPayloadBuilder {
'extNum4': 0,
'extBool1': false,
'extBool2': false,
'extBool3': false,
};
for (var i = 0; i < 5; i++) {
playlog['characterId${i + 1}'] = paddedCharaSlot[i];