genshin-kit / genshin-kit-node

原神玩家信息查询封装库 / An API wrapper for fetching player data of Genshin Impact from any servers.
https://www.npmjs.com/package/genshin-kit
Apache License 2.0
155 stars 18 forks source link

[BUG] 关于国服 UID 200000000 的合法性验证 #46

Closed Android-KitKat closed 3 years ago

Android-KitKat commented 3 years ago

选择您要汇报的包/Choose the package you want to report.

简述此故障/Describe the bug

在 188e4b1 中新增了支持 2 开头的 UID。

但是在验证国服 UID 200000000 是否合法时,返回 false

如何重现此故障/To Reproduce

直接使用 node 命令。

const { isValidCnUid } = require('genshin-kit').util;

isValidCnUid(200000000);
isValidCnUid(200000001);

本应出现的情况/Expected behavior

验证国服 UID 200000000 是否合法时,返回 true

截图/Screenshots

原神UID验证合法性

环境信息/Your environment

额外说明/Additional context

国服确实存在这个玩家,图片来自 Womsxd/YuanShen_User_Info#22。

原神UID200000000

AlPha5130 commented 3 years ago

已修复。