feat(arena-tk2): PvP pair-up trigger via /do_matching, ?scripted=1 opt-in
Solo pollers park (3001 RETRY); two concurrent pollers pair and both receive 3004 + same BattleId. Cache hits on the first arriver's next poll. ?scripted=1 retains today's solo Scripted path for dev work. Response DTO's BattleId/NodeServerUrl become nullable so 3001 omits them on the wire (WhenWritingNull policy drops them). ASP.NET's default bool binder rejects "1" as a value, so the scripted opt-in is bound as string? and parsed permissively (accepts "1" and "true"/"True"/etc.) rather than relying on built-in bool binding.
This commit is contained in:
@@ -17,10 +17,10 @@ public sealed class DoMatchingResponseDto
|
||||
public int RetryPeriod { get; set; } = 3;
|
||||
|
||||
[JsonPropertyName("battle_id")] [Key("battle_id")]
|
||||
public string BattleId { get; set; } = "";
|
||||
public string? BattleId { get; set; }
|
||||
|
||||
[JsonPropertyName("node_server_url")] [Key("node_server_url")]
|
||||
public string NodeServerUrl { get; set; } = "";
|
||||
public string? NodeServerUrl { get; set; }
|
||||
|
||||
// Required by the client when matching_state ∈ {3004, 3007, 3011} —
|
||||
// DoMatchingBase.SettingCardMasterId does jsonData["card_master_id"].ToInt()
|
||||
|
||||
Reference in New Issue
Block a user