XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

chore: fix login in U12.5 (#3833)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3833 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

c1a95e38
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

2 个文件 +4 -3
Modified src/constants/gameToBuildVersion.ts +1 -0
@@ -59,6 +59,7 @@ const gameToBuildVersion = {
59 59 "15.0.0": "2014.10.24.08.24",
60 60 "14.0.0": "2014.07.21.18.38",
61 61 "13.0.0": "2014.04.10.17.47",
62 "12.5.2": "2014.03.21.12.01",
62 63 "11.5.3": "2013.12.21.01.47",
63 64 "11.1.3": "2013.11.29.16.33",
64 65 "10.3.3": "2013.10.11.17.01",
Modified src/controllers/api/loginController.ts +3 -3
@@ -175,11 +175,11 @@ const createLoginResponse = (request: Request, account: IDatabaseAccountJson, bu
175 175 if (version_compare(buildLabel, gameToBuildVersion["7.3.0"]) >= 0) {
176 176 resp.BuildLabel = buildLabel; // U5 no likey
177 177 }
178 if (version_compare(buildLabel, gameToBuildVersion["13.0.0"]) >= 0) {
179 // U13 and up
178 if (version_compare(buildLabel, gameToBuildVersion["12.5.2"]) >= 0) {
179 // U12.5 and up
180 180 resp.CountryCode = account.CountryCode;
181 181 } else {
182 // U12 and down
182 // U12.4 and down
183 183
184 184 // The NatHash is a 64 byte (128 hexit) value which was presumably used for NRS authentication.
185 185 // (OpenWF-specific) We can use this to smuggle custom data like the username to NRS.