From 6ed61ea9f1e236ec7c06d9cceb0085f674b32d88 Mon Sep 17 00:00:00 2001 From: gamer147 Date: Tue, 26 May 2026 23:05:51 -0400 Subject: [PATCH] =?UTF-8?q?feat(bp):=20/battle=5Fpass/info=20response=20DT?= =?UTF-8?q?Os=20=E2=80=94=20string-typed=20wire=20numerics?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- .../Dtos/BattlePass/BattlePassGaugeInfoDto.cs | 32 ++++++++++++++ .../Dtos/BattlePass/BattlePassInfoResponse.cs | 31 +++++++++++++ .../Dtos/BattlePass/BattlePassRewardDto.cs | 43 +++++++++++++++++++ .../BattlePass/BattlePassRewardInfoDto.cs | 19 ++++++++ .../BattlePass/BattlePassRewardListDto.cs | 14 ++++++ .../BattlePass/BattlePassSeasonInfoDto.cs | 42 ++++++++++++++++++ 6 files changed, 181 insertions(+) create mode 100644 SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassGaugeInfoDto.cs create mode 100644 SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassInfoResponse.cs create mode 100644 SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassRewardDto.cs create mode 100644 SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassRewardInfoDto.cs create mode 100644 SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassRewardListDto.cs create mode 100644 SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassSeasonInfoDto.cs diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassGaugeInfoDto.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassGaugeInfoDto.cs new file mode 100644 index 0000000..a970efe --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassGaugeInfoDto.cs @@ -0,0 +1,32 @@ +using MessagePack; +using System.Text.Json.Serialization; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.BattlePass; + +/// +/// gauge_info as emitted on /battle_pass/info (slim shape). The delta-payload fields +/// (point_add, before_*, *_point breakdown, is_premium) are NOT on /info per +/// Wizard/BattlePassGaugeInfo.cs:69 — they appear only when battle_pass_gauge_info +/// is embedded on a battle-finish response. That embedding is out of v1 scope. +/// +[MessagePackObject] +public class BattlePassGaugeInfoDto +{ + [JsonPropertyName("current_point")] + [Key("current_point")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public string CurrentPoint { get; set; } = "0"; + + [JsonPropertyName("current_level")] + [Key("current_level")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public string CurrentLevel { get; set; } = "1"; + + [JsonPropertyName("weekly_battle_pass_point")] + [Key("weekly_battle_pass_point")] + public int WeeklyBattlePassPoint { get; set; } + + [JsonPropertyName("weekly_limit_point")] + [Key("weekly_limit_point")] + public int WeeklyLimitPoint { get; set; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassInfoResponse.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassInfoResponse.cs new file mode 100644 index 0000000..4675b69 --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassInfoResponse.cs @@ -0,0 +1,31 @@ +using MessagePack; +using System.Text.Json.Serialization; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.BattlePass; + +/// +/// Top-level /battle_pass/info response. premium_appeal_level is optional +/// (Wizard/BattlePassInfoTask.cs:77 — guarded by Keys.Contains). +/// +[MessagePackObject] +public class BattlePassInfoResponse +{ + [JsonPropertyName("season_info")] + [Key("season_info")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public BattlePassSeasonInfoDto SeasonInfo { get; set; } = new(); + + [JsonPropertyName("reward_info")] + [Key("reward_info")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public BattlePassRewardInfoDto RewardInfo { get; set; } = new(); + + [JsonPropertyName("gauge_info")] + [Key("gauge_info")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public BattlePassGaugeInfoDto GaugeInfo { get; set; } = new(); + + [JsonPropertyName("premium_appeal_level")] + [Key("premium_appeal_level")] + public List? PremiumAppealLevel { get; set; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassRewardDto.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassRewardDto.cs new file mode 100644 index 0000000..0c23718 --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassRewardDto.cs @@ -0,0 +1,43 @@ +using MessagePack; +using System.Text.Json.Serialization; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.BattlePass; + +/// +/// One reward inside reward_info.normal.reward[] or reward_info.premium.reward[] +/// (Wizard/BattlePassReward.cs:23-32). Numerics are wire-strings; is_received is bool. +/// is_appeal_exclusion ("0"/"1") is omitted from normal track and present on premium. +/// +[MessagePackObject] +public class BattlePassRewardDto +{ + [JsonPropertyName("reward_level")] + [Key("reward_level")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public string RewardLevel { get; set; } = ""; + + [JsonPropertyName("reward_type")] + [Key("reward_type")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public string RewardType { get; set; } = ""; + + [JsonPropertyName("reward_detail_id")] + [Key("reward_detail_id")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public string RewardDetailId { get; set; } = ""; + + [JsonPropertyName("reward_number")] + [Key("reward_number")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public string RewardNumber { get; set; } = ""; + + [JsonPropertyName("is_received")] + [Key("is_received")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public bool IsReceived { get; set; } + + /// "0" or "1"; null/omitted on normal track. + [JsonPropertyName("is_appeal_exclusion")] + [Key("is_appeal_exclusion")] + public string? IsAppealExclusion { get; set; } +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassRewardInfoDto.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassRewardInfoDto.cs new file mode 100644 index 0000000..9e1288a --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassRewardInfoDto.cs @@ -0,0 +1,19 @@ +using MessagePack; +using System.Text.Json.Serialization; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.BattlePass; + +/// reward_info: { normal: { reward: [...] }, premium: { reward: [...] } }. +[MessagePackObject] +public class BattlePassRewardInfoDto +{ + [JsonPropertyName("normal")] + [Key("normal")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public BattlePassRewardListDto Normal { get; set; } = new(); + + [JsonPropertyName("premium")] + [Key("premium")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public BattlePassRewardListDto Premium { get; set; } = new(); +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassRewardListDto.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassRewardListDto.cs new file mode 100644 index 0000000..8ea43d7 --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassRewardListDto.cs @@ -0,0 +1,14 @@ +using MessagePack; +using System.Text.Json.Serialization; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.BattlePass; + +/// Wrapper for one track's reward array: { "reward": [ ... ] }. +[MessagePackObject] +public class BattlePassRewardListDto +{ + [JsonPropertyName("reward")] + [Key("reward")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public List Reward { get; set; } = new(); +} diff --git a/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassSeasonInfoDto.cs b/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassSeasonInfoDto.cs new file mode 100644 index 0000000..9e54f5c --- /dev/null +++ b/SVSim.EmulatedEntrypoint/Models/Dtos/BattlePass/BattlePassSeasonInfoDto.cs @@ -0,0 +1,42 @@ +using MessagePack; +using System.Text.Json.Serialization; + +namespace SVSim.EmulatedEntrypoint.Models.Dtos.BattlePass; + +/// +/// /battle_pass/info → data.season_info. All numerics are wire-strings (Wizard/BattlePassInfoTask.cs:54-58). +/// can_purchase stays a bool (client uses .ToBoolean()). +/// +[MessagePackObject] +public class BattlePassSeasonInfoDto +{ + [JsonPropertyName("id")] + [Key("id")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public string Id { get; set; } = ""; + + [JsonPropertyName("season_name")] + [Key("season_name")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public string SeasonName { get; set; } = ""; + + [JsonPropertyName("max_level")] + [Key("max_level")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public string MaxLevel { get; set; } = ""; + + [JsonPropertyName("start_date")] + [Key("start_date")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public string StartDate { get; set; } = ""; + + [JsonPropertyName("end_date")] + [Key("end_date")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public string EndDate { get; set; } = ""; + + [JsonPropertyName("can_purchase")] + [Key("can_purchase")] + [JsonIgnore(Condition = JsonIgnoreCondition.Never)] + public bool CanPurchase { get; set; } +}