44 lines
1.5 KiB
C#
44 lines
1.5 KiB
C#
using MessagePack;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace SVSim.EmulatedEntrypoint.Models.Dtos;
|
|
|
|
/// <summary>
|
|
/// colosseum_info on /mypage/index, consumed by
|
|
/// ColosseumEntryInfoTask.SetColosseumInfo (Wizard/ColosseumEntryInfoTask.cs:99).
|
|
///
|
|
/// The block is indexed unconditionally — it MUST be present, and
|
|
/// `is_colosseum_period` MUST be set. All other fields are only read inside the
|
|
/// `if (IsColosseumPeriod)` branch, so when no Take Two cup is active we emit
|
|
/// the minimum payload (is_colosseum_period=false) and leave the rest defaulted.
|
|
/// </summary>
|
|
[MessagePackObject]
|
|
public class ColosseumInfo
|
|
{
|
|
[JsonPropertyName("is_colosseum_period")]
|
|
[Key("is_colosseum_period")]
|
|
public bool IsColosseumPeriod { get; set; }
|
|
|
|
[JsonPropertyName("is_round_period")]
|
|
[Key("is_round_period")]
|
|
public bool IsRoundPeriod { get; set; }
|
|
|
|
[JsonPropertyName("deck_format")]
|
|
[Key("deck_format")]
|
|
public int DeckFormat { get; set; }
|
|
|
|
/// <summary>Wire is "1"/"0" string in prod. Client compares with == "1".</summary>
|
|
[JsonPropertyName("is_normal_two_pick")]
|
|
[Key("is_normal_two_pick")]
|
|
public string IsNormalTwoPick { get; set; } = "0";
|
|
|
|
/// <summary>Used as ColorCodeId (stringified int).</summary>
|
|
[JsonPropertyName("is_special_mode")]
|
|
[Key("is_special_mode")]
|
|
public string IsSpecialMode { get; set; } = "0";
|
|
|
|
[JsonPropertyName("colosseum_name")]
|
|
[Key("colosseum_name")]
|
|
public string ColosseumName { get; set; } = string.Empty;
|
|
}
|