Fixed matchmaker for S1 S2 and S3

This commit is contained in:
Burlone
2025-03-16 17:48:52 +01:00
parent f3306086e9
commit 6d27cade40
4 changed files with 62 additions and 5 deletions
+1 -1
View File
@@ -172,7 +172,7 @@ Right now the only tested version is **27.11**, if you test version, have questi
This **project/backend** is licensed under the **BSD 3-Clause License.**
## Credits
Credits have been moved to the **Contributors** section of github.
Credits have been moved to the **Contributors** section of github. If I forgot to include someone, write to **burlone413** on Discord
---
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "reloadbackend",
"version": "1.1.6",
"version": "1.1.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "reloadbackend",
"version": "1.1.6",
"version": "1.1.7",
"description": "Created by Burlone, This is a modded backend, all main backend credits to lawin",
"main": "index.js",
"dependencies": {
+59 -2
View File
@@ -26,9 +26,66 @@ app.get("/fortnite/api/game/v2/matchmakingservice/ticket/player/*", verifyToken,
if (typeof bucketId !== "string" || bucketId.split(":").length !== 4) {
return res.status(400).end();
}
const playlist = bucketId.split(":")[3];
const rawPlaylist = bucketId.split(":")[3];
let playlist = rawPlaylist.toLowerCase();
if (playlist === "2") {
playlist = "playlist_defaultsolo";
} else if (playlist === "10") {
playlist = "playlist_defaultduo";
} else if (playlist === "9") {
playlist = "playlist_defaultsquad";
} else if (playlist === "50") {
playlist = "playlist_50v50";
} else if (playlist === "11") {
playlist = "playlist_50v50";
} else if (playlist === "13") {
playlist = "playlist_highexplosives_squads";
} else if (playlist === "22") {
playlist = "playlist_5x20";
} else if (playlist === "36") {
playlist = "playlist_blitz_solo";
} else if (playlist === "37") {
playlist = "playlist_blitz_duos";
} else if (playlist === "19") {
playlist = "playlist_blitz_squad";
} else if (playlist === "33") {
playlist = "playlist_carmine";
} else if (playlist === "32") {
playlist = "playlist_fortnite";
} else if (playlist === "23") {
playlist = "playlist_highexplosives_solo";
} else if (playlist === "24") {
playlist = "playlist_highexplosives_squads";
} else if (playlist === "44") {
playlist = "playlist_impact_solo";
} else if (playlist === "45") {
playlist = "playlist_impact_duos";
} else if (playlist === "46") {
playlist = "playlist_impact_squads";
} else if (playlist === "35") {
playlist = "playlist_playground";
} else if (playlist === "30") {
playlist = "playlist_skysupply";
} else if (playlist === "42") {
playlist = "playlist_skysupply_duos";
} else if (playlist === "43") {
playlist = "playlist_skysupply_squads";
} else if (playlist === "41") {
playlist = "playlist_snipers";
} else if (playlist === "39") {
playlist = "playlist_snipers_solo";
} else if (playlist === "40") {
playlist = "playlist_snipers_duos";
} else if (playlist === "26") {
playlist = "playlist_solidgold_solo";
} else if (playlist === "27") {
playlist = "playlist_solidgold_squads";
} else if (playlist === "28") {
playlist = "playlist_showdownalt_solo";
}
const gameServers = config.gameServerIP;
let selectedServer = gameServers.find(server => server.split(":")[2] === playlist);
let selectedServer = gameServers.find(server => server.split(":")[2].toLowerCase() === playlist);
if (!selectedServer) {
log.debug("No server found for playlist", playlist);
return error.createError("errors.com.epicgames.common.matchmaking.playlist.not_found", `No server found for playlist ${playlist}`, [], 1013, "invalid_playlist", 404, res);