Card liquefication

This commit is contained in:
gamer147
2026-05-24 14:42:44 -04:00
parent d9ef9fe1fc
commit 12fb2f4801
9 changed files with 862 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
using MessagePack;
using System.Text.Json.Serialization;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Requests.Card;
/// <summary>
/// POST /card/destruct. The single payload field is a JSON-encoded STRING (double-encoded
/// — see docs/api-spec/endpoints/post-login/card-destruct.md). The inner object maps
/// cardId → "&lt;num_to_destruct&gt;,&lt;client_possession_snapshot&gt;". Both inner values
/// are strings. This DTO keeps it as a single string; parsing happens in CardController.
/// </summary>
[MessagePackObject]
public class CardDestructRequest : BaseRequest
{
[JsonPropertyName("card_id_number_array")]
[Key("card_id_number_array")]
public string CardIdNumberArray { get; set; } = string.Empty;
}

View File

@@ -0,0 +1,19 @@
using MessagePack;
using SVSim.EmulatedEntrypoint.Models.Dtos;
using System.Text.Json.Serialization;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses.Card;
/// <summary>
/// /card/destruct response data. reward_list entries are POST-STATE TOTALS (the client's
/// PlayerStaticData.UpdateHaveUserGoodsNumByJsonData does direct assignment) — one
/// RewardType=1 RedEther entry plus one RewardType=5 Card entry per destructed cardId.
/// </summary>
[MessagePackObject]
public class CardDestructResponse
{
[JsonPropertyName("reward_list")]
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
[Key("reward_list")]
public List<RewardListEntry> RewardList { get; set; } = new();
}