Story
This commit is contained in:
24
SVSim.EmulatedEntrypoint/Models/Dtos/Common/BadgeFlag.cs
Normal file
24
SVSim.EmulatedEntrypoint/Models/Dtos/Common/BadgeFlag.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Single-field `{ "is_display_badge": bool }` wrapper. The badge-poll context
|
||||
/// of <c>MyPageNotifications.ParseBadgeInfos</c> (called from StoryFinishTask,
|
||||
/// QuestFinishTask, RecoveryTask, OpenRoomBattleGetRecoveryParamTask) reads
|
||||
/// only this one field from each of <c>quest</c>, <c>story_notification</c>,
|
||||
/// and <c>basic_puzzle</c>, so all three positions share this shape.
|
||||
///
|
||||
/// The mypage-index versions of <c>quest</c> and <c>story_notification</c> have
|
||||
/// richer shapes (<see cref="SVSim.EmulatedEntrypoint.Models.Dtos.Quest"/>,
|
||||
/// <see cref="SVSim.EmulatedEntrypoint.Models.Dtos.StoryNotification"/>) since
|
||||
/// the home-screen UI reads additional fields off them.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class BadgeFlag
|
||||
{
|
||||
[JsonPropertyName("is_display_badge")]
|
||||
[Key("is_display_badge")]
|
||||
public bool IsDisplayBadge { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using MessagePack;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Common;
|
||||
|
||||
/// <summary>
|
||||
/// Flat 4-bool form of <c>shop_notification</c> returned by the badge-poll
|
||||
/// endpoints (StoryFinish, QuestFinish, Recovery, OpenRoomBattleGetRecoveryParam).
|
||||
/// Each bool drives the corresponding shop tab's footer badge via
|
||||
/// <c>ShopNotification.SetShopBadgeEnable</c> (Wizard/ShopNotification.cs:63),
|
||||
/// which calls <c>.ToBoolean()</c> on each directly.
|
||||
///
|
||||
/// Distinct from <see cref="SVSim.EmulatedEntrypoint.Models.Dtos.ShopNotification"/>,
|
||||
/// which is the richer mypage-index shape (each sub-key holds a detail object
|
||||
/// instead of a bool, for the home-screen's animated shop appeals).
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class ShopNotificationBadges
|
||||
{
|
||||
[JsonPropertyName("card_pack")]
|
||||
[Key("card_pack")]
|
||||
public bool CardPack { get; set; }
|
||||
|
||||
[JsonPropertyName("build_deck")]
|
||||
[Key("build_deck")]
|
||||
public bool BuildDeck { get; set; }
|
||||
|
||||
[JsonPropertyName("sleeve")]
|
||||
[Key("sleeve")]
|
||||
public bool Sleeve { get; set; }
|
||||
|
||||
[JsonPropertyName("leader_skin")]
|
||||
[Key("leader_skin")]
|
||||
public bool LeaderSkin { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user