From b4c15bf36a392594e3182abd7ba4961746ef1733 Mon Sep 17 00:00:00 2001 From: Rick Date: Thu, 2 Jul 2020 13:42:23 +0200 Subject: [PATCH] =?UTF-8?q?IP=20weiterleitung=20eingef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Leitet das Spiel bei anfrage an den Player mit der Serverlibary (leider statish) --- src/responses/game.js | 38 ++++++++++++++ user/configs/accounts.json | 10 +++- user/configs/metricsConfig.json | 88 +++++++++++++++++++++++++++++++++ user/configs/mods.json | 12 ++--- 4 files changed, 141 insertions(+), 7 deletions(-) create mode 100644 user/configs/metricsConfig.json diff --git a/src/responses/game.js b/src/responses/game.js index f2b26ea0..3205b92d 100644 --- a/src/responses/game.js +++ b/src/responses/game.js @@ -28,11 +28,49 @@ function groupStatus(url, info, sessionID) { return '{"err": 0, "errmsg": null, "data": null}'; } +function joinMatch(url, info, sessionID) { + let account = account_f.accountServer.find(sessionID); + let profileID = ""; + let matchID = ""; + + // check if the player is a scav + if (info.savage == true) { + matchID = "TEST"; + profileID = "scav" + account.id; + } else { + matchID = "TEST"; + profileID = "pmc" + account.id; + } + + return json.stringify({"err": 0, "errmsg": null, "data":[{"profileid": profileID, "status": "busy", "ip": "127.0.0.1", "port": 9909, "location": info.location, "sid": "", "gamemode": "deathmatch", "shortid": matchID}]}); +} + +function getGroupStatus(url, info, sessionID) { + return json.stringify({"err": 0, "errmsg": null, "data": {"players": [], "invite": [], "group": []}}); +} + +function matchAvailable(url, info, sessionID) { + return json.stringify({"err": 0, "errmsg": null, "data": true}); +} +function getMetricsConfig(url, info, sessionID) { + return json.read('user/configs/metricsConfig.json'); +} + +function putMetrics(url, info, sessionID) { + return json.stringify({"err":0, "errmsg":null, "data":null}); +} +router.addStaticRoute("/client/putMetrics", putMetrics); +router.addStaticRoute("/client/getMetricsConfig", getMetricsConfig); router.addStaticRoute("/client/game/profile/select", selectProfile); router.addStaticRoute("/client/profile/status", getProfileStatus); +router.addStaticRoute("/client/match/group/status", getGroupStatus) +router.addStaticRoute("/client/match/join", joinMatch); +router.addStaticRoute("/client/match/exit", nullResponse); router.addStaticRoute("/client/server/list", getServer); router.addStaticRoute("/client/game/version/validate", validateGameVersion); router.addStaticRoute("/client/game/config", getGameConfig); router.addStaticRoute("/client/game/logout", nullResponse); router.addStaticRoute("/client/match/group/status", groupStatus); router.addStaticRoute("/client/match/exit", nullResponse); +router.addStaticRoute("/client/match/available", matchAvailable); + diff --git a/user/configs/accounts.json b/user/configs/accounts.json index 72c3f886..932e025f 100644 --- a/user/configs/accounts.json +++ b/user/configs/accounts.json @@ -4,7 +4,15 @@ "nickname": "user", "email": "user@jet.com", "password": "password", - "wipe": true, + "wipe": false, + "edition": "eod" + }, + "2": { + "id": 2, + "nickname": "Bear", + "email": "Bear@jet.com", + "password": "password", + "wipe": false, "edition": "eod" } } \ No newline at end of file diff --git a/user/configs/metricsConfig.json b/user/configs/metricsConfig.json new file mode 100644 index 00000000..5abc9d2c --- /dev/null +++ b/user/configs/metricsConfig.json @@ -0,0 +1,88 @@ +{ + "err": 0, + "errmsg": null, + "data": { + "Keys": [ + 0, + 8, + 10, + 13, + 16, + 20, + 26, + 30, + 33, + 45, + 53, + 66, + 100, + 500, + 750, + 1000 + ], + "NetProcessingBins": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 10, + 13, + 16, + 20, + 26, + 30, + 33, + 45, + 53, + 66, + 100, + 500, + 750, + 1000 + ], + "RenderBins": [ + 0, + 4, + 8, + 10, + 13, + 16, + 20, + 26, + 30, + 33, + 45, + 53, + 66, + 100, + 500, + 750, + 1000 + ], + "GameUpdateBins": [ + 0, + 4, + 8, + 10, + 13, + 16, + 20, + 26, + 30, + 33, + 45, + 53, + 66, + 100, + 500, + 750, + 1000 + ], + "MemoryMeasureInterval": 180 + } +} \ No newline at end of file diff --git a/user/configs/mods.json b/user/configs/mods.json index 5be64a54..92dcf52d 100644 --- a/user/configs/mods.json +++ b/user/configs/mods.json @@ -1,8 +1,8 @@ [ - { - "name": "AllMissingKeys", - "author": "EmuTarkov", - "version": "1.0.0", - "enabled": true - } + { + "name": "AllMissingKeys", + "author": "EmuTarkov", + "version": "1.0.0", + "enabled": true + } ] \ No newline at end of file