feat(tutorial): /tutorial/pack_open emits tutorial_step=100, advances viewer state
Stack [HttpPost("/tutorial/pack_open")] alias on PackController.Open. Detect
isTutorialPath via HttpContext.Request.Path; gate the type_detail rejection,
currency switch, open-count tracking, and currency reward_list entries behind
!isTutorialPath so the starter legendary pack (99047/990047, type_detail=5)
bypasses the purchasable-pack code path. After grant, set MissionData.TutorialState=100
and emit tutorial_step=100 in PackOpenResponse — this is the sole END transition,
per live-traffic capture. Add pack 99047 to test-fixture packs.json.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,14 @@ public class PackOpenResponse
|
||||
[JsonPropertyName("mission_result")]
|
||||
[Key("mission_result")]
|
||||
public List<object> MissionResult { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Set only on the /tutorial/pack_open path to signal the END (100) transition inline with
|
||||
/// the pack reward. Global WhenWritingNull keeps it off the wire on regular /pack/open.
|
||||
/// </summary>
|
||||
[JsonPropertyName("tutorial_step")]
|
||||
[Key("tutorial_step")]
|
||||
public int? TutorialStep { get; set; }
|
||||
}
|
||||
|
||||
[MessagePackObject]
|
||||
|
||||
Reference in New Issue
Block a user