feat(bp): /battle_pass/info response DTOs — string-typed wire numerics
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.BattlePass;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[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; }
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.BattlePass;
|
||||
|
||||
/// <summary>
|
||||
/// Top-level /battle_pass/info response. premium_appeal_level is optional
|
||||
/// (Wizard/BattlePassInfoTask.cs:77 — guarded by Keys.Contains).
|
||||
/// </summary>
|
||||
[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<int>? PremiumAppealLevel { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.BattlePass;
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[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; }
|
||||
|
||||
/// <summary>"0" or "1"; null/omitted on normal track.</summary>
|
||||
[JsonPropertyName("is_appeal_exclusion")]
|
||||
[Key("is_appeal_exclusion")]
|
||||
public string? IsAppealExclusion { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.BattlePass;
|
||||
|
||||
/// <summary>reward_info: { normal: { reward: [...] }, premium: { reward: [...] } }.</summary>
|
||||
[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();
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.BattlePass;
|
||||
|
||||
/// <summary>Wrapper for one track's reward array: <c>{ "reward": [ ... ] }</c>.</summary>
|
||||
[MessagePackObject]
|
||||
public class BattlePassRewardListDto
|
||||
{
|
||||
[JsonPropertyName("reward")]
|
||||
[Key("reward")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
|
||||
public List<BattlePassRewardDto> Reward { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.BattlePass;
|
||||
|
||||
/// <summary>
|
||||
/// /battle_pass/info → data.season_info. All numerics are wire-strings (Wizard/BattlePassInfoTask.cs:54-58).
|
||||
/// can_purchase stays a bool (client uses .ToBoolean()).
|
||||
/// </summary>
|
||||
[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; }
|
||||
}
|
||||
Reference in New Issue
Block a user