diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/BattleResultsDto.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/BattleResultsDto.cs new file mode 100644 index 0000000..dce2198 --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/BattleResultsDto.cs @@ -0,0 +1,15 @@ +using System.Text.Json.Serialization; +using MessagePack; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.Common.ArenaTwoPick; + +[MessagePackObject] +public class BattleResultsDto +{ + /// Each entry is 0 (loss) or 1 (win). Native int array — matches capture. + [JsonPropertyName("result_list")] [Key("result_list")] + public List ResultList { get; set; } = new(); + + [JsonPropertyName("win_count")] [Key("win_count")] + public int WinCount { get; set; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/CandidatePairDto.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/CandidatePairDto.cs new file mode 100644 index 0000000..0519d2a --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/CandidatePairDto.cs @@ -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; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/ClassInfoDto.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/ClassInfoDto.cs new file mode 100644 index 0000000..1c2b862 --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/ClassInfoDto.cs @@ -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; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/DeckInfoDto.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/DeckInfoDto.cs new file mode 100644 index 0000000..082dd57 --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/DeckInfoDto.cs @@ -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; } + + /// Native bool on the wire (NOT stringified — matches capture). + [JsonPropertyName("is_select_completed")] [Key("is_select_completed")] + public bool IsSelectCompleted { get; set; } + + /// Native long[] (raw ints in capture). Parser does .ToInt(); emitting as numbers matches prod. + [JsonPropertyName("selected_card_ids")] [Key("selected_card_ids")] + public List SelectedCardIds { get; set; } = new(); + + [JsonPropertyName("select_turn")] [Key("select_turn")] + public int SelectTurn { get; set; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/EntryInfoDto.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/EntryInfoDto.cs new file mode 100644 index 0000000..14c30ed --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/EntryInfoDto.cs @@ -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; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/RewardEntryDto.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/RewardEntryDto.cs new file mode 100644 index 0000000..d71547e --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/Common/ArenaTwoPick/RewardEntryDto.cs @@ -0,0 +1,22 @@ +using System.Text.Json.Serialization; +using MessagePack; +using SVSim.EmulatedEntrypoint.Models.Dtos.Common; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.Common.ArenaTwoPick; + +/// +/// One entry on the TK2 reward_list / rewards wire arrays. Matches the entry-response capture +/// (reward_type int, reward_id int, reward_num string). +/// +[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; } +}