Files
SVSimServer/SVSim.EmulatedEntrypoint/Models/Dtos/DailyLoginBonus.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

27 lines
918 B
C#

using MessagePack;
using System.Text.Json.Serialization;
namespace SVSim.EmulatedEntrypoint.Models.Dtos;
/// <summary>
/// Wire shape: { normal?, total?, campaign? (array) }. Client parser at
/// LoadDetail.cs:553 reads exactly these three keys. <c>normal</c> presence drives
/// IsExistLoginBonusData() / popup eligibility.
/// </summary>
[MessagePackObject]
public class DailyLoginBonus
{
[JsonPropertyName("normal")] [Key("normal")]
public LoginBonusCampaign? Normal { get; set; }
[JsonPropertyName("total")] [Key("total")]
public LoginBonusCampaign? Total { get; set; }
/// <summary>
/// Array of campaign panels (LoadDetail.cs:583 iterates jsonData3[i]). Empty list
/// when no specials are active — prod sends [] not null in that case.
/// </summary>
[JsonPropertyName("campaign")] [Key("campaign")]
public List<LoginBonusCampaign> Campaign { get; set; } = new();
}