Files
SVSimServer/SVSim.EmulatedEntrypoint/Controllers/CheckController.cs
2024-09-07 22:14:24 -04:00

95 lines
3.2 KiB
C#

using System.Buffers.Text;
using System.Text;
using MessagePack;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using SVSim.EmulatedEntrypoint.Models.Dtos;
using SVSim.EmulatedEntrypoint.Models.Dtos.Requests;
using SVSim.EmulatedEntrypoint.Models.Dtos.Responses;
namespace SVSim.EmulatedEntrypoint.Controllers
{
[Route("api/[controller]")]
[ApiController]
public class CheckController : SVSimController
{
private ILogger _logger;
public CheckController(ILogger<CheckController> logger)
{
_logger = logger;
}
[AllowAnonymous]
[HttpPost("special_title")]
public async Task<DataWrapper<SpecialTitleCheckResponse>> SpecialTitleCheck(SpecialTitleCheckRequest request)
{
int titleId = Random.Shared.Next(8, 33);
var res = new DataWrapper<SpecialTitleCheckResponse>
{
Data = new SpecialTitleCheckResponse
{
TitleImageId = titleId,
TitleSoundId = titleId
},
DataHeaders = new DataHeaders
{
ShortUdid = 411054851,
ViewerId = 906243102,
Sid = string.Empty,
Servertime = DateTime.UtcNow.Ticks,
ResultCode = 1
}
};
return res;
}
[HttpPost("game_start")]
public async Task<DataWrapper<GameStartResponse>> GameStart(GameStartRequest request)
{
return new DataWrapper<GameStartResponse>()
{
DataHeaders = new DataHeaders
{
ShortUdid = 411054851,
ViewerId = 906243102,
Sid = string.Empty,
Servertime = DateTime.UtcNow.Ticks,
ResultCode = 1
},
Data = new GameStartResponse()
{
IsSetTransitionPassword = true,
KorAuthorityId = default,
KorAuthorityState = default,
NowRank = new Dictionary<string, string>()
{
{"1", "RankName_010"},
{"2", "RankName_010"},
{"4", "RankName_017"}
},
NowName = "combusty7",
PolicyState = default,
PolicyId = default,
NowTutorialStep = "100",
NowViewerId = 906243102,
TosId = default,
TosState = default,
TransitionAccountData = new List<TransitionAccountData>()
{
new TransitionAccountData()
{
ConnectedViewerId = "906243102",
SocialAccountType = "5",
SocialAccountId = "76561197970830305"
}
}
}
};
}
}
}