From 6f3f1fe5b95bbd6f257b67172649053c0932ee64 Mon Sep 17 00:00:00 2001 From: Sainan Date: Mon, 17 Mar 2025 14:33:47 +0100 Subject: [PATCH] fix: syndicate mission oids being longer than 24 chars --- src/controllers/dynamic/worldStateController.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/dynamic/worldStateController.ts b/src/controllers/dynamic/worldStateController.ts index d995f5e8..4772751b 100644 --- a/src/controllers/dynamic/worldStateController.ts +++ b/src/controllers/dynamic/worldStateController.ts @@ -53,7 +53,7 @@ export const worldStateController: RequestHandler = (req, res) => { const bountyCycleStart = bountyCycle * 9000000; const bountyCycleEnd = bountyCycleStart + 9000000; worldState.SyndicateMissions[worldState.SyndicateMissions.findIndex(x => x.Tag == "ZarimanSyndicate")] = { - _id: { $oid: bountyCycleStart.toString(16) + "0000000000000029" }, + _id: { $oid: Math.trunc(bountyCycleStart / 1000).toString(16) + "0000000000000029" }, Activation: { $date: { $numberLong: bountyCycleStart.toString() } }, Expiry: { $date: { $numberLong: bountyCycleEnd.toString() } }, Tag: "ZarimanSyndicate", @@ -61,7 +61,7 @@ export const worldStateController: RequestHandler = (req, res) => { Nodes: [] }; worldState.SyndicateMissions[worldState.SyndicateMissions.findIndex(x => x.Tag == "EntratiLabSyndicate")] = { - _id: { $oid: bountyCycleStart.toString(16) + "0000000000000004" }, + _id: { $oid: Math.trunc(bountyCycleStart / 1000).toString(16) + "0000000000000004" }, Activation: { $date: { $numberLong: bountyCycleStart.toString() } }, Expiry: { $date: { $numberLong: bountyCycleEnd.toString() } }, Tag: "EntratiLabSyndicate", @@ -69,7 +69,7 @@ export const worldStateController: RequestHandler = (req, res) => { Nodes: [] }; worldState.SyndicateMissions[worldState.SyndicateMissions.findIndex(x => x.Tag == "HexSyndicate")] = { - _id: { $oid: bountyCycleStart.toString(16) + "0000000000000006" }, + _id: { $oid: Math.trunc(bountyCycleStart / 1000).toString(16) + "0000000000000006" }, Activation: { $date: { $numberLong: bountyCycleStart.toString(10) } }, Expiry: { $date: { $numberLong: bountyCycleEnd.toString(10) } }, Tag: "HexSyndicate",