os android cbt

This commit is contained in:
AlessandroCH
2025-06-09 16:04:19 +02:00
parent 723b81d5e4
commit c00d7cf0d7
2 changed files with 26 additions and 4 deletions

View File

@@ -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
{

View File

@@ -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();