feat: 风险页新增数值修改、一键跑图与万花筒专区
- 修改总 Rating:只写 playerRating 与 userRating.rating,钳 0~99999, 每首歌各自的 ratingList 原样带回 - 添加舞里程(UserDetail.point):完整 int32 区间,支持累加与直接设定, 允许负值即扣减 - 一键跑图:isClear/isComplete 在客户端是从 distance 派生的,单发 flag 会被 冲掉,故把 distance 推过 End 里程针;unlockFlag 语义是反的 - 万花筒专区:发现门与获取钥匙落在 userKaleidxScopeList 同一行的两个布尔位, 钥匙不走 userItemList;上行是整行替换,所以先读回原行再叠加 - 旅行伙伴:修正误导性的示例 ID 1001(合法是三位数,表里没有的 ID 服务器照收 但客户端静默跳过),编组槽位可设定等级,上传后回读复查以区分失败原因 - 补 MIT 许可证
This commit is contained in:
1 parent
329845f228
commit
0808e367f7
15 files changed
+3597
-42
No files matched your search
@@ -10,6 +10,7 @@ import 'package:pointycastle/export.dart';
|
||||
import '../config/title_server_config.dart';
|
||||
import '../models/user_data.dart';
|
||||
import '../models/user_character.dart';
|
||||
import '../models/user_kaleidx_scope.dart';
|
||||
import '../models/user_preview.dart';
|
||||
import '../models/user_rating.dart';
|
||||
|
||||
@@ -568,6 +569,46 @@ class TitleApiService {
|
||||
);
|
||||
return UserCharacterBean.listFromResponse(json);
|
||||
}
|
||||
|
||||
/// 区域进度列表,对应 UserMapResponseVO。
|
||||
///
|
||||
/// 客户端 `PacketGetUserMap.cs:51-57` 是分页拉的:`nextIndex != 0` 就用它续拉,
|
||||
/// 把所有页的 `userMapList` 拼起来。这里照做,否则只能看到第一页的区域。
|
||||
Future<List<Map<String, dynamic>>> getUserMaps(int userId) async {
|
||||
const apiName = 'GetUserMapApi';
|
||||
final all = <Map<String, dynamic>>[];
|
||||
var nextIndex = 0;
|
||||
var pages = 0;
|
||||
|
||||
do {
|
||||
final json = await _callApi(apiName, {
|
||||
'userId': userId,
|
||||
'nextIndex': nextIndex,
|
||||
}, userId);
|
||||
|
||||
final list = json['userMapList'];
|
||||
if (list is List) {
|
||||
all.addAll(list.whereType<Map<String, dynamic>>());
|
||||
}
|
||||
nextIndex = (json['nextIndex'] as num?)?.toInt() ?? 0;
|
||||
pages++;
|
||||
} while (nextIndex != 0 && pages < 20);
|
||||
|
||||
return all;
|
||||
}
|
||||
|
||||
/// 万花宿命之门进度,对应 UserKaleidxScopeResponseVO。
|
||||
///
|
||||
/// 与 `GetUserMapApi` 不同,这个接口不分页(`UserKaleidxScopeRequestVO`
|
||||
/// 只有 `userId` 一个字段),一次拿全。
|
||||
Future<List<UserKaleidxScopeBean>> getUserKaleidxScopes(int userId) async {
|
||||
final json = await _callApi(
|
||||
'GetUserKaleidxScopeApi',
|
||||
{'userId': userId},
|
||||
userId,
|
||||
);
|
||||
return UserKaleidxScopeBean.listFromResponse(json);
|
||||
}
|
||||
}
|
||||
|
||||
class _RandomHelper {
|
||||
|
||||
Reference in new issue
Block a user