46 lines
1.7 KiB
C#
46 lines
1.7 KiB
C#
using System.Collections.Generic;
|
|
using System.Dynamic;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using AutoMapper;
|
|
using Newtonsoft.Json;
|
|
using TOOHUCardAPI.Data.Models;
|
|
|
|
namespace TOOHUCardAPI.DTO
|
|
{
|
|
public class PlayerDataGetResponseObject
|
|
{
|
|
[JsonProperty("bo")]
|
|
public Dictionary<string, Dictionary<string, object>> Players { get; set; }
|
|
|
|
}
|
|
/**
|
|
* Fields pulled from the game code
|
|
* Looking up Gamerules.Playerdata
|
|
*/
|
|
public class PlayerDataGetResponseObjectPlayer: AbstractResponse
|
|
{
|
|
[JsonProperty("steamid")]
|
|
public string SteamId { get; set; }
|
|
[JsonProperty("max_wave")] public int MaxWave { get; set; } = 0;
|
|
[JsonProperty("max_team_wave")] public int MaxTeamWave { get; set; } = 0;
|
|
[JsonProperty("pet_level")] public int PetLevel { get; set; } = 1;
|
|
[JsonProperty("end_time")] public string EndTime { get; set; } = string.Empty;
|
|
[JsonProperty("key_total")] public int KeyTotal { get; set; } = 100;
|
|
[JsonProperty("key_save_date")] public string KeySaveDate { get; set; } = string.Empty;
|
|
[JsonProperty("vip")] public int Vip { get; set; } = 1;
|
|
[JsonProperty("point")] public int Point { get; set; } = 10000;
|
|
[JsonProperty("level_list")] public string LevelList { get; set; } = string.Empty;
|
|
|
|
public Dictionary<string, object> ToDynamicProperties()
|
|
{
|
|
return GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public)
|
|
.ToDictionary(prop => prop.Name, prop => prop.GetValue(this));
|
|
}
|
|
}
|
|
|
|
public class PlayerDataSaveCardGroupResponseObject : AbstractResponse
|
|
{
|
|
|
|
}
|
|
} |