mirror of
https://github.com/JogmansonReal/Radicade.git
synced 2026-10-26 07:29:00 -07:00
Radicade Public Code
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
using RadicadeServer.RecNet.Events;
|
||||
|
||||
namespace RadicadeServer.RecNet.Responses
|
||||
{
|
||||
public class AllEvents
|
||||
{
|
||||
public List<PlayerEvent> Created { get; set; } = new();
|
||||
public List<EventResponse> Responses { get; set; } = new();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
namespace RadicadeServer.RecNet.Responses
|
||||
{
|
||||
public class AuthResponse
|
||||
{
|
||||
public string error { get; set; } = string.Empty;
|
||||
public string error_description { get; set; } = string.Empty;
|
||||
public string access_token { get; set; } = null!;
|
||||
public string refresh_token { get; set; } = null!;
|
||||
public string key { get; set; } = null!;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public string eac_nonce { get; set; } = null!;
|
||||
|
||||
public AuthResponse(string Error, string ErrorDescription)
|
||||
{
|
||||
error = Error;
|
||||
error_description = ErrorDescription;
|
||||
}
|
||||
public AuthResponse() {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using RadicadeServer.RecNet.Enums.Store;
|
||||
|
||||
namespace RadicadeServer.RecNet.Responses
|
||||
{
|
||||
public class BalanceResponse
|
||||
{
|
||||
public long Balance { get; set; }
|
||||
public CurrencyType CurrencyType { get; set; }
|
||||
|
||||
public int BalanceType { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace RadicadeServer.RecNet.Responses
|
||||
{
|
||||
public class ClientAction
|
||||
{
|
||||
public bool ALOCDGMHFKA { get; set; }
|
||||
|
||||
public string FBILGKFKFJE { get; set; } = string.Empty;
|
||||
|
||||
public static ClientAction Ok() => new() { ALOCDGMHFKA = true };
|
||||
|
||||
public static ClientAction Failure(string why) => new() { ALOCDGMHFKA = false, FBILGKFKFJE = why };
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace RadicadeServer.RecNet.Responses
|
||||
{
|
||||
public class Failure
|
||||
{
|
||||
public bool success { get; set; } = false;
|
||||
|
||||
public string error { get; set; } = string.Empty;
|
||||
|
||||
public Failure(string why)
|
||||
{
|
||||
success = false;
|
||||
error = string.IsNullOrWhiteSpace(why) ? "request failed" : why;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using RadicadeServer.RecNet.Accounts;
|
||||
using RadicadeServer.RecNet.Enums.Rooms;
|
||||
using RadicadeServer.RecNet.Rooms;
|
||||
|
||||
namespace RadicadeServer.RecNet.Responses
|
||||
{
|
||||
public class MatchResponse
|
||||
{
|
||||
public JoinStatus errorCode { get; set; }
|
||||
public RoomInstance? roomInstance { get; set; }
|
||||
|
||||
public static MatchResponse Error(JoinStatus status)
|
||||
{
|
||||
return new MatchResponse { errorCode = status, roomInstance = null };
|
||||
}
|
||||
public MatchResponse()
|
||||
{
|
||||
|
||||
}
|
||||
public MatchResponse(JoinStatus status, RoomInstance instance)
|
||||
{
|
||||
this.errorCode = status;
|
||||
this.roomInstance = instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using RadicadeServer.RecNet.Leveling;
|
||||
using RadicadeServer.RecNet.Progression;
|
||||
using RadicadeServer.Utils;
|
||||
|
||||
namespace RadicadeServer.RecNet.Responses
|
||||
{
|
||||
public class ProgressionResponse
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long PlayerId { get; set; }
|
||||
public int Level { get; set; }
|
||||
public int XP { get; set; }
|
||||
|
||||
public ProgressionResponse() {}
|
||||
public ProgressionResponse(ProgressionData data) {
|
||||
this.Id = data.PlayerId;
|
||||
this.PlayerId = data.PlayerId;
|
||||
this.Level = LevelUpGiftService.DisplayLevel(data.Level);
|
||||
this.XP = LevelUpGiftService.XpIntoCurrentLevel(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace RadicadeServer.RecNet.Responses
|
||||
{
|
||||
public class Success
|
||||
{
|
||||
internal static readonly Success Ok = new Success(true, null, null);
|
||||
internal static Success Error(string why) => new Success(false, why, null);
|
||||
|
||||
public bool success { get; set; }
|
||||
|
||||
public string error { get; set; } = string.Empty;
|
||||
|
||||
public object? value { get; set; }
|
||||
|
||||
public Success(bool success, string? error, object? value) {
|
||||
this.success = success;
|
||||
this.error = error ?? string.Empty;
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using RadicadeServer.RecNet.Enums;
|
||||
|
||||
namespace RadicadeServer.RecNet.Responses
|
||||
{
|
||||
public class TagResponse
|
||||
{
|
||||
public int Results { get { return Tags.Count; } }
|
||||
public List<ItemTag> Tags { get; set; } = null!;
|
||||
}
|
||||
public class InventionTagResponse
|
||||
{
|
||||
public InventionTagResult Result { get; set; }
|
||||
public List<string> Tags { get; set; } = new();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user