Practice/deck editing mostly there

This commit is contained in:
gamer147
2026-05-24 00:17:28 -04:00
parent 21b97269ff
commit bdff142d16
14 changed files with 588 additions and 59 deletions

View File

@@ -0,0 +1,12 @@
using MessagePack;
using System.Text.Json.Serialization;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Requests;
[MessagePackObject]
public class ConfigUpdateFoilPreferredRequest : BaseRequest
{
[JsonPropertyName("is_foil_preferred")]
[Key("is_foil_preferred")]
public int IsFoilPreferred { get; set; }
}

View File

@@ -0,0 +1,12 @@
using MessagePack;
using System.Text.Json.Serialization;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Requests;
[MessagePackObject]
public class ConfigUpdatePrizePreferredRequest : BaseRequest
{
[JsonPropertyName("is_prize_preferred")]
[Key("is_prize_preferred")]
public int IsPrizePreferred { get; set; }
}

View File

@@ -54,7 +54,32 @@ public class UserDeck
public int Order { get; set; }
[JsonPropertyName("create_deck_time")]
[Key("create_deck_time")]
public DateTime DeckCreateTime { get; set; }
public DateTime? DeckCreateTime { get; set; }
/// <summary>
/// Empty placeholder matching the wire shape prod uses to pad deck-list responses up to the
/// per-format cap. The client's <c>DeckUI.DeckViewData.CreateDeckViewList</c> converts the
/// first entry whose <c>card_id_array</c> is empty into the "New Deck" tile, so at least one
/// of these must appear in any list the player can edit.
/// </summary>
public static UserDeck CreateEmptySlot(int deckNo) => new()
{
DeckNumber = deckNo,
ClassId = 1,
SleeveId = 3000011,
LeaderSkinId = 0,
Name = string.Empty,
Cards = new(),
IsCompleteDeck = 0,
RestrictedCardExists = false,
IsAvailable = 1,
MaintenanceCards = new(),
IncludesNonCollectibleCards = false,
IsRandomLeaderSkin = 0,
LeaderSkinIds = new() { 0 },
Order = 0,
DeckCreateTime = null,
};
public UserDeck(ShadowverseDeckEntry deck)
{