返回提交历史
Modified
src/constants/gameToBuildVersion.ts
+1
-1
Modified
src/controllers/api/inventoryController.ts
+1
-1
Modified
src/controllers/dynamic/getProfileViewingDataController.ts
+2
-2
Modified
src/helpers/inventoryHelpers.ts
+2
-2
Modified
src/services/worldStateService.ts
+1
-1
XFEstudio/XFESpaceNinjaServer
fix: use correct oid/date format in 19.5.3 (#4108)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/4108 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
9fa35810
代码差异
5 个文件
+7
-7
@@ -50,7 +50,7 @@ const gameToBuildVersion = {
50
50
"21.0.0": "2017.06.29.02.13",
51
51
"20.4.0": "2017.05.05.15.41",
52
52
"20.0.0": "2017.03.24.17.25",
53
"19.5.0": "2016.12.21.19.13",
53
"19.5.3": "2016.12.23.09.26",
54
54
"19.4.1": "2016.12.16.14.33",
55
55
"19.0.1": "2016.11.12.20.09",
56
56
"18.22.1": "2016.09.30.12.04",
@@ -738,7 +738,7 @@ export const getInventoryResponse = async (
738
738
}
739
739
740
740
// U19.5 and below use $id instead of $oid as well as a different date format
741
if (version_compare(buildLabel, gameToBuildVersion["19.5.0"]) > 0) {
741
if (version_compare(buildLabel, gameToBuildVersion["19.5.3"]) > 0) {
742
742
return inventoryResponse;
743
743
}
744
744
for (const category of equipmentKeys) {
@@ -327,7 +327,7 @@ const processLoadoutEquipment = (
327
327
}
328
328
}
329
329
330
if (buildLabel && version_compare(buildLabel, gameToBuildVersion["19.5.0"]) <= 0) {
330
if (buildLabel && version_compare(buildLabel, gameToBuildVersion["19.5.3"]) <= 0) {
331
331
toLegacyOid(item.ItemId);
332
332
}
333
333
};
@@ -344,7 +344,7 @@ const populateLoadout = async (
344
344
inventory.CurrentLoadOutIds[LoadoutIndex.NORMAL]
345
345
)!.toJSON<ILoadoutConfigClient>();
346
346
result.LoadOutPreset.ItemId = undefined;
347
if (buildLabel && version_compare(buildLabel, gameToBuildVersion["19.5.0"]) <= 0) {
347
if (buildLabel && version_compare(buildLabel, gameToBuildVersion["19.5.3"]) <= 0) {
348
348
if (result.LoadOutPreset.s?.ItemId) {
349
349
toLegacyOid(result.LoadOutPreset.s.ItemId);
350
350
}
@@ -35,7 +35,7 @@ export function toOid2(objectId: Types.ObjectId | string, buildLabel: undefined)
35
35
export function toOid2(objectId: Types.ObjectId | string, buildLabel: string | undefined): IOidWithLegacySupport;
36
36
export function toOid2(objectId: Types.ObjectId | string, buildLabel: string | undefined): IOidWithLegacySupport {
37
37
const oid = typeof objectId == "string" ? objectId : objectId.toString();
38
if (buildLabel && version_compare(buildLabel, gameToBuildVersion["19.5.0"]) <= 0) {
38
if (buildLabel && version_compare(buildLabel, gameToBuildVersion["19.5.3"]) <= 0) {
39
39
return { $id: oid };
40
40
}
41
41
return { $oid: oid };
@@ -45,7 +45,7 @@ export function toMongoDate2(value: Date | number, buildLabel: undefined): IMong
45
45
export function toMongoDate2(value: Date | number, buildLabel: string | undefined): IMongoDateWithLegacySupport;
46
46
export function toMongoDate2(value: Date | number, buildLabel: string | undefined): IMongoDateWithLegacySupport {
47
47
const ms = value instanceof Date ? value.getTime() : value;
48
if (buildLabel && version_compare(buildLabel, gameToBuildVersion["19.5.0"]) <= 0) {
48
if (buildLabel && version_compare(buildLabel, gameToBuildVersion["19.5.3"]) <= 0) {
49
49
return { sec: Math.floor(ms / 1000), usec: (ms % 1000) * 1000 };
50
50
}
51
51
@@ -4085,7 +4085,7 @@ export const getWorldState = (buildLabel?: string): IWorldState => {
4085
4085
}
4086
4086
4087
4087
// Sheev parts were added in 19.6.3, so versions prior to that may take too kindly to seeing invasions.
4088
if (!buildLabel || version_compare(buildLabel, gameToBuildVersion["19.5.0"]) > 0) {
4088
if (!buildLabel || version_compare(buildLabel, gameToBuildVersion["19.5.3"]) > 0) {
4089
4089
// Rough outline of dynamic invasions.
4090
4090
// TODO: Invasions chains, e.g. an infestation mission would soon lead to other nodes on that planet also having an infestation invasion.
4091
4091
// TODO: Grineer/Corpus to fund their death stars with each invasion win.