Class leader fixes
This commit is contained in:
@@ -125,7 +125,7 @@ public class DeckController : SVSimController
|
||||
}),
|
||||
UserLeaderSkinSettingList = viewerClasses.ToDictionary(
|
||||
vc => vc.Id.ToString(),
|
||||
vc => new DefaultLeaderSkinSetting
|
||||
vc => new UserLeaderSkinSetting
|
||||
{
|
||||
ClassId = vc.Id,
|
||||
IsRandomLeaderSkin = 0, // random-skin mode (per-class shuffle pool) not yet persisted
|
||||
|
||||
@@ -46,10 +46,11 @@ public class DeckListResponse
|
||||
[Key("default_deck_list")] public Dictionary<string, DefaultDeck> DefaultDeckList { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Default leader skin per class, keyed by class_id as string.
|
||||
/// Per-class leader skin setting (active skin id) for the requesting viewer, keyed by
|
||||
/// class_id as string.
|
||||
/// </summary>
|
||||
[JsonPropertyName("user_leader_skin_setting_list")]
|
||||
[Key("user_leader_skin_setting_list")] public Dictionary<string, DefaultLeaderSkinSetting> UserLeaderSkinSettingList { get; set; } = new();
|
||||
[Key("user_leader_skin_setting_list")] public Dictionary<string, UserLeaderSkinSetting> UserLeaderSkinSettingList { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Trial / tutorial-specific decks. Prod emits this on <c>/deck/info</c> (All format) but
|
||||
|
||||
@@ -4,12 +4,13 @@ using System.Text.Json.Serialization;
|
||||
namespace SVSim.EmulatedEntrypoint.Models.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// Default leader skin per class (8 entries — one per class). Surfaced under
|
||||
/// <c>/deck/info data.user_leader_skin_setting_list</c>. Despite the <c>user_</c> prefix on the
|
||||
/// wire, this is GLOBAL data (same for every viewer) — naming is the client's, not ours.
|
||||
/// Per-class entry of <c>/deck/info data.user_leader_skin_setting_list</c>. Per-viewer state:
|
||||
/// each viewer's class-level "active leader skin" preference, used as a fallback when a deck
|
||||
/// has <c>leader_skin_id == 0</c>. Sourced from <c>ViewerClassData.LeaderSkin</c>; mutated by
|
||||
/// <c>POST /leader_skin/set</c>.
|
||||
/// </summary>
|
||||
[MessagePackObject]
|
||||
public class DefaultLeaderSkinSetting
|
||||
public class UserLeaderSkinSetting
|
||||
{
|
||||
[JsonPropertyName("class_id")]
|
||||
[Key("class_id")]
|
||||
Reference in New Issue
Block a user