Files
SVSimServer/SVSim.EmulatedEntrypoint/Models/Dtos/Responses/IndexResponse.cs
2026-05-23 14:18:01 -04:00

205 lines
6.4 KiB
C#

using MessagePack;
using SVSim.Database.Enums;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses;
[MessagePackObject]
public class IndexResponse
{
#region Primitive Returns
[Key("spot_point")]
public int SpotPoint { get; set; }
[Key("is_available_colosseum_free_entry")]
public bool IsAvailableColosseumFreeEntry { get; set; }
[Key("friend_battle_invite_count")]
public int FriendBattleInviteCount { get; set; }
[Key("battle_recovery_status")]
public int BattleRecoveryStatus { get; set; }
[Key("room_recovery_status")]
public int RoomRecoveryStatus { get; set; }
[Key("is_battle_pass_period")]
public int IsBattlePassPeriod { get; set; }
[Key("card_set_id_for_resource_dl_view")]
public int CardSetIdForResourceDlView { get; set; }
[Key("deck_format")]
public int DeckFormat { get; set; } = 1;
#endregion
#region Basic User Data
[Key("user_tutorial")]
public UserTutorial UserTutorial { get; set; } = new UserTutorial();
[Key("user_info")]
public UserInfo UserInfo { get; set; } = new UserInfo();
[Key("user_crystal_count")]
public UserCurrency UserCurrency { get; set; } = new UserCurrency();
#endregion
#region Inventory Data
[Key("user_item_list")]
public List<UserItem> UserItems { get; set; } = new();
[Key("user_deck_rotation")]
public UserFormatDeckInfo UserRotationDecks { get; set; } = new();
[Key("user_deck_unlimited")]
public UserFormatDeckInfo UserUnlimitedDecks { get; set; } = new();
[Key("user_deck_my_rotation")]
public UserFormatDeckInfo UserMyRotationDecks { get; set; } = new();
[Key("user_card_list")]
public List<UserCard> UserCards { get; set; } = new();
[Key("user_class_list")]
public List<UserClass> UserClasses { get; set; } = new();
/// <summary>
/// Wire is an array; parser iterates by index (LoadDetail.cs:358-360).
/// </summary>
[Key("user_sleeve_list")]
public List<SleeveIdentifier> Sleeves { get; set; } = new();
[Key("user_emblem_list")]
public List<EmblemIdentifier> UserEmblems { get; set; } = new();
[Key("user_degree_list")]
public List<DegreeIdentifier> UserDegrees { get; set; } = new();
/// <summary>
/// Wire is an array; parser iterates by index (LoadDetail.cs:348-356).
/// </summary>
[Key("user_leader_skin_list")]
public List<UserLeaderSkin> LeaderSkins { get; set; } = new();
/// <summary>
/// Wire is string[]; parser calls .ToString() on each element (LoadDetail.cs:387-392).
/// </summary>
[Key("user_mypage_list")]
public List<string> MyPageBackgrounds { get; set; } = new();
#endregion
#region Advanced Player Data
/// <summary>
/// Wire is an array of 5 entries; parser uses deck_format as discriminator
/// (LoadDetail.cs:527-538).
/// </summary>
[Key("user_rank")]
public List<UserRankInfo> UserRankInfo { get; set; } = new();
[Key("user_rank_match_list")]
public List<UserRankedMatches> UserRankedMatches { get; set; } = new();
[Key("daily_login_bonus")]
public DailyLoginBonus DailyLoginBonus { get; set; } = new();
[Key("challenge_config")]
public ArenaConfig ArenaConfig { get; set; } = new();
#endregion
#region Global Data
[Key("red_ether_overwrite_list")]
public List<RedEtherOverride> RedEtherOverrides { get; set; } = new();
/// <summary>
/// Wire is a flat number[]; parser passes it straight to SetMaintenanceCardIds
/// (LoadDetail.cs:165).
/// </summary>
[Key("maintenance_card_list")]
public List<long> MaintenanceCards { get; set; } = new();
[Key("arena_info")]
public List<ArenaInfo> ArenaInfos { get; set; } = new();
/// <summary>
/// Wire is an array; client uses POSITIONAL logic (index >= 24 = master ranks,
/// LoadDetail.cs:417-422). Order must match repository's ordering.
/// </summary>
[Key("rank_info")]
public List<RankInfo> RankInfo { get; set; } = new();
/// <summary>
/// Wire is an array; parser iterates by index (LoadDetail.cs:425-434).
/// </summary>
[Key("class_exp")]
public List<ClassExp> ClassExp { get; set; } = new();
[Key("loading_exclusion_card_list")]
public List<long> LoadingTipCardExclusions { get; set; } = new();
[Key("default_setting")]
public DefaultSettings DefaultSettings { get; set; } = new();
[Key("unlimited_restricted_base_card_id_list")]
public Dictionary<string, int> UnlimitedBanList { get; set; } = new();
/// <summary>
/// Client unconditionally accesses [1] and [Count-1] (LoadDetail.cs:184) — list MUST
/// have at least 2 entries or the client crashes.
/// </summary>
[Key("rotation_card_set_id_list")]
public List<CardSetIdentifier> RotationSets { get; set; } = new();
/// <summary>
/// Wire is a flat number[]; parser iterates and reads .ToInt() (LoadDetail.cs:463-468).
/// </summary>
[Key("reprinted_base_card_ids")]
public List<long> ReprintedCards { get; set; } = new();
[Key("spot_cards")]
public Dictionary<string, int> SpotCards { get; set; } = new();
[Key("pre_release_info")]
public PreReleaseInfo? PreReleaseInfo { get; set; }
[Key("my_rotation_info")]
public MyRotationInfo? MyRotationInfo { get; set; }
[Key("avatar_info")]
public MyRotationInfo? AvatarRotationInfo { get; set; }
[Key("feature_maintenance_list")]
public List<FeatureMaintenance> FeatureMaintenances { get; set; } = new();
[Key("special_crystal_info")]
public List<SpecialCrystalInfo> SpecialCrystalInfos { get; set; } = new();
[Key("battle_pass_level_info")]
public Dictionary<string, BattlePassLevel>? BattlePassLevelInfo { get; set; }
/// <summary>
/// Wire is string[]; parser calls .ToString() on each element (LoadDetail.cs:493-499).
/// </summary>
[Key("open_battle_field_id_list")]
public List<string> OpenBattlefieldIds { get; set; } = new();
#endregion
#region Misc Data
[Key("loot_box_regulation")]
public LootBoxRegulations LootBoxRegulations { get; set; } = new();
[Key("gathering_info")]
public GatheringInfo GatheringInfo { get; set; } = new();
/// <summary>
/// Spec is unclear whether this is returned at /load/index or only at /config/* endpoints
/// (load-index.md line 390). Pending live-capture confirmation; harmless extra.
/// </summary>
[Key("user_config")]
public UserConfig UserConfig { get; set; } = new();
#endregion
}