feat(config): wire /config/update + /config/update_challenge_config (closes family 4/4)
is_skip_gacha_effect, use_challenge_two_pick_premium_card, and challenge_two_pick_sleeve_id all persist on ViewerInfo and round-trip through /load/index. The two challenge fields move from the global ChallengeConfig section to ViewerInfo — they're viewer preferences, not server-wide policy. Premium card defaults to 0; sleeve falls back to DefaultLoadoutConfig.SleeveId (3000011) when unset. MatchContextBuilder's TK2 sleeve read switches to the same viewer-scoped path. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -248,8 +248,10 @@ public class LoadController : SVSimController
|
||||
}).ToList(),
|
||||
ArenaConfig = new ArenaConfig
|
||||
{
|
||||
UseChallengePickTwoPremiumCard = challenge.UseTwoPickPremiumCard ? 1 : 0,
|
||||
ChallengePickTwoCardSleeve = (int)challenge.TwoPickSleeveId,
|
||||
UseChallengePickTwoPremiumCard = viewer.Info.UseChallengeTwoPickPremiumCard ? 1 : 0,
|
||||
ChallengePickTwoCardSleeve = (int)(viewer.Info.ChallengeTwoPickSleeveId != 0
|
||||
? viewer.Info.ChallengeTwoPickSleeveId
|
||||
: defaultLoadout.SleeveId),
|
||||
},
|
||||
ArenaInfos = await BuildArenaInfosAsync(viewer.Id),
|
||||
RotationSets = rotationSets,
|
||||
@@ -257,6 +259,7 @@ public class LoadController : SVSimController
|
||||
{
|
||||
IsFoilPreferred = viewer.Info.IsFoilPreferred ? 1 : 0,
|
||||
IsPrizePreferred = viewer.Info.IsPrizePreferred ? 1 : 0,
|
||||
IsSkipGachaEffect = viewer.Info.IsSkipGachaEffect ? 1 : 0,
|
||||
},
|
||||
OpenBattlefieldIds = (await _globalsRepository.GetBattlefields(true))
|
||||
.Select(bf => bf.Id.ToString()).ToList(),
|
||||
|
||||
Reference in New Issue
Block a user