fix(arena-tk2): include card_master_id in do_matching success response
The decompiled client's DoMatchingBase.SettingCardMasterId calls
jsonData["card_master_id"].ToInt() with no Keys.Contains guard when
matching_state ∈ {3004, 3007, 3011}. Omitting the field crashes the
client with KeyNotFoundException at Cute.NetworkManager+Connect.
Add CardMasterId to DoMatchingResponseDto with a default value of 1
(matching the /load/index response and prod captures). Extend the
controller test to assert the field is present.
Caught during the v1 smoke walk-through; full client log line:
[Error: Unity Log] KeyNotFoundException: The given key was not
present in the dictionary.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -29,5 +29,8 @@ public class ArenaTwoPickBattleControllerTests
|
||||
Assert.That(battleId, Is.Not.Null.And.Not.Empty);
|
||||
var nodeUrl = root.GetProperty("node_server_url").GetString();
|
||||
Assert.That(nodeUrl, Does.StartWith("ws://"));
|
||||
// Required when matching_state ∈ {3004,3007,3011} per
|
||||
// DoMatchingBase.SettingCardMasterId; client throws KeyNotFoundException without it.
|
||||
Assert.That(root.GetProperty("card_master_id").GetInt32(), Is.EqualTo(1));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user