From c00d7cf0d74ca871f36093780a9034dabea0003f Mon Sep 17 00:00:00 2001 From: AlessandroCH Date: Mon, 9 Jun 2025 16:04:19 +0200 Subject: [PATCH] os android cbt --- Campofinale/Game/SceneManager.cs | 3 --- Campofinale/Http/Dispatch.cs | 27 ++++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/Campofinale/Game/SceneManager.cs b/Campofinale/Game/SceneManager.cs index 318a4c7..c90de27 100644 --- a/Campofinale/Game/SceneManager.cs +++ b/Campofinale/Game/SceneManager.cs @@ -4,13 +4,10 @@ using Campofinale.Packets.Sc; using Campofinale.Resource; using Campofinale.Resource.Dynamic; using MongoDB.Bson.Serialization.Attributes; -using System.Numerics; using System.Text.Json.Serialization; using static Campofinale.Resource.Dynamic.SpawnerConfig; using static Campofinale.Resource.ResourceManager; using static Campofinale.Resource.ResourceManager.LevelScene.LevelData; -using static Campofinale.Resource.ResourceManager.LevelScene.LevelData.ParamKeyValue; -using static System.Formats.Asn1.AsnWriter; namespace Campofinale.Game { diff --git a/Campofinale/Http/Dispatch.cs b/Campofinale/Http/Dispatch.cs index 9d2e621..4a495a7 100644 --- a/Campofinale/Http/Dispatch.cs +++ b/Campofinale/Http/Dispatch.cs @@ -241,7 +241,32 @@ namespace Campofinale.Http await ctx.Response.SendAsync(resp); } - + //ANDROID + [StaticRoute(HttpServerLite.HttpMethod.GET, "/api/remote_config/get_remote_config/1003/prod-cbt/default/Android/res_version")] + public static async Task os_android_res_version(HttpContext ctx) + { + + string resp = "{\"version\": \"2413221-312\", \"kickFlag\": false}"; + + + ctx.Response.StatusCode = 200; + //ctx.Response.ContentLength = resp.Length; + ctx.Response.ContentType = "application/json"; + + await ctx.Response.SendAsync(resp); + } + [StaticRoute(HttpServerLite.HttpMethod.GET, "/api/remote_config/get_remote_config/1003/prod-cbt/default/Android/game_config")] + public static async Task game_config_os_android(HttpContext ctx) + { + string resp = "{\"mockLogin\": false, \"selectSrv\": false, \"enableHotUpdate\": true, \"enableNpcOptimize\": false, \"enableEntitySpawnLog\": false, \"enableCBT2AccessForbidden\": false, \"enableMobileFullScreenWaterMark\": false}"; + + ctx.Response.StatusCode = 200; + ctx.Response.ContentLength = resp.Length; + ctx.Response.ContentType = "application/json"; + + await ctx.Response.SendAsync(resp); + } + public static async Task data(HttpContext ctx) { string fileId = ctx.Request.Url.Elements.LastOrDefault();