Things were working, suddenly regressed
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using MessagePack;
|
||||
using SVSim.Database.Enums;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses;
|
||||
@@ -24,15 +25,22 @@ public class IndexResponse
|
||||
[JsonPropertyName("room_recovery_status")]
|
||||
[Key("room_recovery_status")]
|
||||
public int RoomRecoveryStatus { get; set; }
|
||||
/// <summary>
|
||||
/// Prod emits this as bool (per the 2026-05-23 capture); the spec leaves it as a TODO
|
||||
/// (load-index.md line 296-297). We send bool to match prod; client's `.ToBoolean()`
|
||||
/// path handles either shape, but matching prod avoids the int-vs-bool drift noted in
|
||||
/// the seed-data-strategy crash audit.
|
||||
/// </summary>
|
||||
[JsonPropertyName("is_battle_pass_period")]
|
||||
[Key("is_battle_pass_period")]
|
||||
public int IsBattlePassPeriod { get; set; }
|
||||
public bool IsBattlePassPeriod { get; set; }
|
||||
[JsonPropertyName("card_set_id_for_resource_dl_view")]
|
||||
[Key("card_set_id_for_resource_dl_view")]
|
||||
public int CardSetIdForResourceDlView { get; set; }
|
||||
// Serialized as wire deck_format via FormatJsonConverter (registered in Program.cs).
|
||||
[JsonPropertyName("deck_format")]
|
||||
[Key("deck_format")]
|
||||
public int DeckFormat { get; set; } = 1;
|
||||
public Format DeckFormat { get; set; } = Format.Rotation;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -123,9 +131,15 @@ public class IndexResponse
|
||||
[Key("user_rank_match_list")]
|
||||
public List<UserRankedMatches> UserRankedMatches { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Spec: optional. Shape is {normal?, total?, campaign?[]} per common/types.ts.md DailyLoginBonus.
|
||||
/// Until we have an active login-bonus campaign to surface in spec shape, omit. The skeleton
|
||||
/// rows in DailyLoginBonuses table (prod sent {"1":[], "3":[], "4":[]}) preserve the capture
|
||||
/// for archive but don't make it into the wire response.
|
||||
/// </summary>
|
||||
[JsonPropertyName("daily_login_bonus")]
|
||||
[Key("daily_login_bonus")]
|
||||
public DailyLoginBonus DailyLoginBonus { get; set; } = new();
|
||||
public DailyLoginBonus? DailyLoginBonus { get; set; }
|
||||
|
||||
[JsonPropertyName("challenge_config")]
|
||||
[Key("challenge_config")]
|
||||
@@ -213,7 +227,7 @@ public class IndexResponse
|
||||
|
||||
[JsonPropertyName("avatar_info")]
|
||||
[Key("avatar_info")]
|
||||
public MyRotationInfo? AvatarRotationInfo { get; set; }
|
||||
public AvatarInfo? AvatarRotationInfo { get; set; }
|
||||
|
||||
[JsonPropertyName("feature_maintenance_list")]
|
||||
[Key("feature_maintenance_list")]
|
||||
@@ -223,6 +237,10 @@ public class IndexResponse
|
||||
[Key("special_crystal_info")]
|
||||
public List<SpecialCrystalInfo> SpecialCrystalInfos { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Spec: optional, Record<string, BattlePassLevelInfo> keyed by level-as-string
|
||||
/// (load-index.md:228). Omit (null) when no Battle Pass is active.
|
||||
/// </summary>
|
||||
[JsonPropertyName("battle_pass_level_info")]
|
||||
[Key("battle_pass_level_info")]
|
||||
public Dictionary<string, BattlePassLevel>? BattlePassLevelInfo { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user