mirror of
https://github.com/JogmansonReal/Radicade.git
synced 2026-10-26 23:49:02 -07:00
Radicade Public Code
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json;
|
||||
using RadicadeServer.Extensions;
|
||||
using RadicadeServer.RecNet.Avatar;
|
||||
|
||||
namespace RadicadeServer.RecNet.Accounts.Local
|
||||
{
|
||||
public class PlayerAvatar
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public long AccountId { get; set; }
|
||||
public string Avatar { get; set; } = null!;
|
||||
public string Outfits { get; set; } = null!;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public string EquipmentSlots { get; set; } = "[]";
|
||||
|
||||
public Avatar.Avatar? DeserializeAvatar()
|
||||
{
|
||||
return Avatar.FromJson<Avatar.Avatar>();
|
||||
}
|
||||
public string SerializeAvatar(Avatar.Avatar avatar)
|
||||
{
|
||||
Avatar = avatar.ToJson();
|
||||
return Avatar;
|
||||
}
|
||||
|
||||
public List<Avatar.Avatar>? DeserializeOutfits()
|
||||
{
|
||||
return Outfits.FromJson<List<Avatar.Avatar>>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user