Files
SVSimServer/SVSim.EmulatedEntrypoint/Models/Dtos/LoginBonusCampaign.cs
gamer147 e6e3f919a6 fix(dto): align daily_login_bonus DTOs with prod wire shape
- numeric fields ship as quoted strings (campaign_id, img, effect_id,
  reward_type, reward_detail_id, reward_number)
- DailyLoginBonus.Campaign is a List<>, not a single object
- LoginBonusCampaign.Img replaces Image (string, asset-key)
- add IsOneDayMultiRewards (SpecialData-only on client, byte-faithful)
2026-06-13 15:59:42 -04:00

41 lines
1.5 KiB
C#

using MessagePack;
using System.Text.Json.Serialization;
namespace SVSim.EmulatedEntrypoint.Models.Dtos;
/// <summary>
/// One login-bonus campaign panel. Used for normal, each campaign array entry, and (when
/// populated) total. <c>campaign_id</c> and <c>img</c> ship as strings on the wire. Client
/// consumers: NormalData (reads name, now_count, is_next_reward, reward[]),
/// SpecialData (also reads start_date, end_date, img, is_one_day_multi_rewards),
/// ContinuousData (reads only reward[]).
/// </summary>
[MessagePackObject]
public class LoginBonusCampaign
{
[JsonPropertyName("name")] [Key("name")]
public string Name { get; set; } = string.Empty;
[JsonPropertyName("campaign_id")] [Key("campaign_id")]
public string CampaignId { get; set; } = "0";
[JsonPropertyName("img")] [Key("img")]
public string Img { get; set; } = "0";
[JsonPropertyName("now_count")] [Key("now_count")]
public int NowCount { get; set; }
[JsonPropertyName("is_next_reward")] [Key("is_next_reward")]
public bool IsNextReward { get; set; }
[JsonPropertyName("reward")] [Key("reward")]
public List<LoginBonusReward> Rewards { get; set; } = new();
/// <summary>
/// SpecialData-only on the client (SpecialData.cs:50). Server emits it on every panel
/// for byte-faithful replay; client ignores it on Normal/Total paths.
/// </summary>
[JsonPropertyName("is_one_day_multi_rewards")] [Key("is_one_day_multi_rewards")]
public bool IsOneDayMultiRewards { get; set; }
}