feat(dto): TK2 common DTOs (entry/class/deck/candidate/results/reward)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using MessagePack;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Common.ArenaTwoPick;
|
||||
|
||||
[MessagePackObject]
|
||||
public class BattleResultsDto
|
||||
{
|
||||
/// <summary>Each entry is 0 (loss) or 1 (win). Native int array — matches capture.</summary>
|
||||
[JsonPropertyName("result_list")] [Key("result_list")]
|
||||
public List<int> ResultList { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("win_count")] [Key("win_count")]
|
||||
public int WinCount { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using MessagePack;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Common.ArenaTwoPick;
|
||||
|
||||
[MessagePackObject]
|
||||
public class CandidatePairDto
|
||||
{
|
||||
[JsonPropertyName("id")] [JsonConverter(typeof(StringifiedLongConverter))] [Key("id")]
|
||||
public long Id { get; set; }
|
||||
|
||||
[JsonPropertyName("turn")] [JsonConverter(typeof(StringifiedIntConverter))] [Key("turn")]
|
||||
public int Turn { get; set; }
|
||||
|
||||
[JsonPropertyName("set_num")] [JsonConverter(typeof(StringifiedIntConverter))] [Key("set_num")]
|
||||
public int SetNum { get; set; }
|
||||
|
||||
[JsonPropertyName("card_id_1")] [JsonConverter(typeof(StringifiedLongConverter))] [Key("card_id_1")]
|
||||
public long CardId1 { get; set; }
|
||||
|
||||
[JsonPropertyName("card_id_2")] [JsonConverter(typeof(StringifiedLongConverter))] [Key("card_id_2")]
|
||||
public long CardId2 { get; set; }
|
||||
|
||||
[JsonPropertyName("is_selected")] [JsonConverter(typeof(StringifiedIntConverter))] [Key("is_selected")]
|
||||
public int IsSelected { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using MessagePack;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Common.ArenaTwoPick;
|
||||
|
||||
[MessagePackObject]
|
||||
public class ClassInfoDto
|
||||
{
|
||||
[JsonPropertyName("class_id_1")] [JsonConverter(typeof(StringifiedIntConverter))] [Key("class_id_1")]
|
||||
public int ClassId1 { get; set; }
|
||||
|
||||
[JsonPropertyName("class_id_2")] [JsonConverter(typeof(StringifiedIntConverter))] [Key("class_id_2")]
|
||||
public int ClassId2 { get; set; }
|
||||
|
||||
[JsonPropertyName("class_id_3")] [JsonConverter(typeof(StringifiedIntConverter))] [Key("class_id_3")]
|
||||
public int ClassId3 { get; set; }
|
||||
|
||||
[JsonPropertyName("selected_class_id")] [JsonConverter(typeof(StringifiedIntConverter))] [Key("selected_class_id")]
|
||||
public int SelectedClassId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using MessagePack;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Common.ArenaTwoPick;
|
||||
|
||||
[MessagePackObject]
|
||||
public class DeckInfoDto
|
||||
{
|
||||
[JsonPropertyName("two_pick_entry_id")] [JsonConverter(typeof(StringifiedLongConverter))] [Key("two_pick_entry_id")]
|
||||
public long TwoPickEntryId { get; set; }
|
||||
|
||||
[JsonPropertyName("class_id")] [JsonConverter(typeof(StringifiedIntConverter))] [Key("class_id")]
|
||||
public int ClassId { get; set; }
|
||||
|
||||
/// <summary>Native bool on the wire (NOT stringified — matches capture).</summary>
|
||||
[JsonPropertyName("is_select_completed")] [Key("is_select_completed")]
|
||||
public bool IsSelectCompleted { get; set; }
|
||||
|
||||
/// <summary>Native long[] (raw ints in capture). Parser does .ToInt(); emitting as numbers matches prod.</summary>
|
||||
[JsonPropertyName("selected_card_ids")] [Key("selected_card_ids")]
|
||||
public List<long> SelectedCardIds { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("select_turn")] [Key("select_turn")]
|
||||
public int SelectTurn { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using MessagePack;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Common.ArenaTwoPick;
|
||||
|
||||
[MessagePackObject]
|
||||
public class EntryInfoDto
|
||||
{
|
||||
[JsonPropertyName("id")] [JsonConverter(typeof(StringifiedLongConverter))] [Key("id")]
|
||||
public long Id { get; set; }
|
||||
|
||||
[JsonPropertyName("viewer_id")] [JsonConverter(typeof(StringifiedLongConverter))] [Key("viewer_id")]
|
||||
public long ViewerId { get; set; }
|
||||
|
||||
[JsonPropertyName("reward_schedule_id")] [JsonConverter(typeof(StringifiedIntConverter))] [Key("reward_schedule_id")]
|
||||
public int RewardScheduleId { get; set; }
|
||||
|
||||
[JsonPropertyName("challenge_id")] [JsonConverter(typeof(StringifiedIntConverter))] [Key("challenge_id")]
|
||||
public int ChallengeId { get; set; }
|
||||
|
||||
[JsonPropertyName("max_battle_count")] [JsonConverter(typeof(StringifiedIntConverter))] [Key("max_battle_count")]
|
||||
public int MaxBattleCount { get; set; }
|
||||
|
||||
[JsonPropertyName("leader_skin_id")] [JsonConverter(typeof(StringifiedLongConverter))] [Key("leader_skin_id")]
|
||||
public long LeaderSkinId { get; set; }
|
||||
|
||||
[JsonPropertyName("is_retire")] [JsonConverter(typeof(StringifiedIntConverter))] [Key("is_retire")]
|
||||
public int IsRetire { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using MessagePack;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Common.ArenaTwoPick;
|
||||
|
||||
/// <summary>
|
||||
/// One entry on the TK2 reward_list / rewards wire arrays. Matches the entry-response capture
|
||||
/// (reward_type int, reward_id int, reward_num string).
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class RewardEntryDto
|
||||
{
|
||||
[JsonPropertyName("reward_type")] [Key("reward_type")]
|
||||
public int RewardType { get; set; }
|
||||
|
||||
[JsonPropertyName("reward_id")] [Key("reward_id")]
|
||||
public long RewardId { get; set; }
|
||||
|
||||
[JsonPropertyName("reward_num")] [JsonConverter(typeof(StringifiedIntConverter))] [Key("reward_num")]
|
||||
public int RewardNum { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user