mirror of
https://github.com/MikuLeaks/KianaBH3.git
synced 2025-12-14 22:04:36 +01:00
Init enter game
This commit is contained in:
13
Common/Data/Models/Dispatch/DispatchQuery.cs
Normal file
13
Common/Data/Models/Dispatch/DispatchQuery.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace KianaBH.Data.Models.Dispatch;
|
||||
|
||||
public class DispatchQuery
|
||||
{
|
||||
[Required] public string? Version { get; set; }
|
||||
[FromQuery(Name = "t")] public int Timestamp { get; set; }
|
||||
public string? Lang { get; set; }
|
||||
public int Uid { get; set; }
|
||||
public string? Token { get; set; }
|
||||
}
|
||||
17
Common/Data/Models/Dispatch/QueryDispatchModels.cs
Normal file
17
Common/Data/Models/Dispatch/QueryDispatchModels.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace KianaBH.Data.Models.Dispatch;
|
||||
|
||||
public class QueryDispatchResponse
|
||||
{
|
||||
public int Retcode { get; set; }
|
||||
public List<RegionInfo> RegionList { get; set; } = [];
|
||||
|
||||
|
||||
public class RegionInfo
|
||||
{
|
||||
public string? DispatchUrl { get; set; }
|
||||
public object? Ext { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public int Retcode { get; set; }
|
||||
public string? Title { get; set; }
|
||||
}
|
||||
}
|
||||
30
Common/Data/Models/Dispatch/QueryGatewayModels.cs
Normal file
30
Common/Data/Models/Dispatch/QueryGatewayModels.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using KianaBH.Util.Extensions;
|
||||
using KianaBH.Configuration;
|
||||
|
||||
namespace KianaBH.Data.Models.Dispatch;
|
||||
|
||||
public class QueryGatewayResponse
|
||||
{
|
||||
public long ServerCurTime { get; set; } = Extensions.GetUnixSec();
|
||||
public int ServerCurTimezone { get; set; } = (int)TimeZoneInfo.Local.GetUtcOffset(DateTime.Now).TotalHours;
|
||||
public string RegionName { get; set; } = "KianaBH";
|
||||
public string Msg { get; set; } = "";
|
||||
public bool IsDataReady { get; set; } = true;
|
||||
public int Retcode { get; set; }
|
||||
|
||||
public string? AccountUrl { get; set; }
|
||||
public ServerInfo? Gameserver { get; set; }
|
||||
public ServerInfo? Gateway { get; set; }
|
||||
public List<string> ExResourceUrlList { get; set; } = [];
|
||||
public List<string> ExAudioAndVideoUrlList { get; set; } = [];
|
||||
public List<string> AssetBundleUrlList { get; set; } = [];
|
||||
public HotfixManfiset? Manifest { get; set; }
|
||||
public Dictionary<string, object> Ext { get; set; } = new();
|
||||
|
||||
public class ServerInfo
|
||||
{
|
||||
public string? Ip { get; set; }
|
||||
public bool IsKcp { get; set; }
|
||||
public int Port { get; set; }
|
||||
}
|
||||
}
|
||||
34
Common/Data/Models/Sdk/ComboGranterModels.cs
Normal file
34
Common/Data/Models/Sdk/ComboGranterModels.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using KianaBH.Util.Extensions;
|
||||
|
||||
namespace KianaBH.Data.Models.Sdk;
|
||||
|
||||
public class ComboGranterData
|
||||
{
|
||||
public string? Uid { get; set; }
|
||||
public string? Token { get; set; }
|
||||
}
|
||||
|
||||
public class ComboGranterRequest
|
||||
{
|
||||
[Required]
|
||||
[JsonConverter(typeof(JsonStringToObjectConverter<ComboGranterData>))]
|
||||
public ComboGranterData? Data { get; set; }
|
||||
}
|
||||
|
||||
public class ComboGranterResponse : ResponseBase
|
||||
{
|
||||
public new ComboGranterResponseData? Data { get; set; }
|
||||
|
||||
public class ComboGranterResponseData
|
||||
{
|
||||
public uint AccountType { get; set; }
|
||||
public string? OpenId { get; set; }
|
||||
public string? ComboId { get; set; }
|
||||
public string? ComboToken { get; set; }
|
||||
public bool Heartbeat { get; set; }
|
||||
public string? Data { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
6
Common/Data/Models/Sdk/DeviceFingerprintController.cs
Normal file
6
Common/Data/Models/Sdk/DeviceFingerprintController.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace KianaBH.Data.Models.Sdk;
|
||||
public class GetDeviceFingerprintRequest
|
||||
{
|
||||
public string? DeviceFp { get; set; }
|
||||
}
|
||||
|
||||
20
Common/Data/Models/Sdk/GameWeatherModels.cs
Normal file
20
Common/Data/Models/Sdk/GameWeatherModels.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace KianaBH.Data.Models.Sdk;
|
||||
|
||||
public class GetWeatherResponse : ResponseBase
|
||||
{
|
||||
public new GetWeatherResponseData? Data { get; set; }
|
||||
|
||||
public class GetWeatherResponseData
|
||||
{
|
||||
public int Timezone { get; set; }
|
||||
public List<HourlyWeatherData> Hourly { get; set; } = [];
|
||||
|
||||
public class HourlyWeatherData
|
||||
{
|
||||
public int Condition { get; set; }
|
||||
public int Hour { get; set; }
|
||||
public string? Date { get; set; }
|
||||
public int Temp { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Common/Data/Models/Sdk/MdkShieldModels.cs
Normal file
42
Common/Data/Models/Sdk/MdkShieldModels.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
namespace KianaBH.Data.Models.Sdk;
|
||||
|
||||
public class MdkShieldLoginRequest
|
||||
{
|
||||
public string? Account { get; set; }
|
||||
public string? Password { get; set; }
|
||||
public bool IsCrypto { get; set; }
|
||||
}
|
||||
|
||||
public class MdkShieldVerifyRequest
|
||||
{
|
||||
public string? Uid { get; set; }
|
||||
public string? Token { get; set; }
|
||||
}
|
||||
|
||||
// TODO: Move this to DB instead
|
||||
public class MdkShieldAccountData
|
||||
{
|
||||
public string? Token { get; set; }
|
||||
public string? Uid { get; set; }
|
||||
|
||||
public string Email { get; set; } = "";
|
||||
public string IsEmailVerify { get; set; } = "0";
|
||||
public string AreaCode { get; set; } = "";
|
||||
public string Country { get; set; } = "";
|
||||
public string Name { get; set; } = "";
|
||||
public string Realname { get; set; } = "";
|
||||
}
|
||||
|
||||
public class MdkShieldResponse : ResponseBase
|
||||
{
|
||||
public new MdkShieldResponseData? Data { get; set; }
|
||||
|
||||
public class MdkShieldResponseData
|
||||
{
|
||||
public MdkShieldAccountData? Account { get; set; }
|
||||
public bool DeviceGrantRequired { get; set; }
|
||||
public bool ReactiveRequired { get; set; }
|
||||
public bool RealpersonRequired { get; set; }
|
||||
public bool SafeMobileRequeired { get; set; }
|
||||
}
|
||||
}
|
||||
9
Common/Data/Models/Sdk/ResponseBase.cs
Normal file
9
Common/Data/Models/Sdk/ResponseBase.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace KianaBH.Data.Models.Sdk;
|
||||
|
||||
public class ResponseBase
|
||||
{
|
||||
public string Message { get; set; } = "OK";
|
||||
public bool Success { get; set; } = true;
|
||||
public int Retcode { get; set; }
|
||||
public object? Data { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user