chore: derive MatchmakingBuildId from buildLabel (#3041)
Reviewed-on: #3041 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit was merged in pull request #3041.
This commit is contained in:
@@ -161,7 +161,16 @@ const createLoginResponse = (
|
||||
if (version_compare(buildLabel, "2022.09.06.19.24") >= 0) {
|
||||
resp.CrossPlatformAllowed = account.CrossPlatformAllowed;
|
||||
resp.HUB = `${myUrlBase}/api/`;
|
||||
resp.MatchmakingBuildId = buildConfig.matchmakingBuildId;
|
||||
|
||||
// The MatchmakingBuildId is a 64-bit integer represented as a decimal string. On live, the value is seemingly random per build, but really any value that is different across builds should work.
|
||||
const [year, month, day, hour, minute] = buildLabel.split(".").map(x => parseInt(x));
|
||||
resp.MatchmakingBuildId = (
|
||||
year * 1_00_00_00_00 +
|
||||
month * 1_00_00_00 +
|
||||
day * 1_00_00 +
|
||||
hour * 1_00 +
|
||||
minute
|
||||
).toString();
|
||||
}
|
||||
if (version_compare(buildLabel, "2023.04.25.23.40") >= 0) {
|
||||
if (version_compare(buildLabel, "2025.08.26.09.49") >= 0) {
|
||||
|
||||
@@ -5,13 +5,11 @@ import { repoDir } from "../helpers/pathHelper.ts";
|
||||
interface IBuildConfig {
|
||||
version: string;
|
||||
buildLabel: string;
|
||||
matchmakingBuildId: string;
|
||||
}
|
||||
|
||||
export const buildConfig: IBuildConfig = {
|
||||
version: "",
|
||||
buildLabel: "",
|
||||
matchmakingBuildId: ""
|
||||
buildLabel: ""
|
||||
};
|
||||
|
||||
const buildConfigPath = path.join(repoDir, "static/data/buildConfig.json");
|
||||
|
||||
@@ -31,7 +31,7 @@ export interface ISession {
|
||||
export interface IFindSessionRequest {
|
||||
id?: string;
|
||||
originalSessionId?: string;
|
||||
buildId?: number;
|
||||
buildId?: number | bigint;
|
||||
gameModeId?: number;
|
||||
regionId?: number;
|
||||
maxEloDifference?: number;
|
||||
|
||||
Reference in New Issue
Block a user