refactor(battlenode): type MatchContext.ClassId as CardClass enum (§C)
Behavior-preserving; full solution builds, 1013 tests green. ClassId is the one genuinely-closed set of the three flagged stringly fields, so it becomes a CardClass enum (1..8). Wire stays "1".."8": producer casts (CardClass)run.ClassId, ServerBattleFrames renders via CardClassWire.ToWireValue(). RankBattleController's AI-start path drops a fragile int.TryParse(...)?:-1 for (int)cast. CharaId (free-form leader/skin id, e.g. "5000123") and CountryCode (open-ended account data) stay string with proper XML docs; CountryCodes.Korea/Japan name the captured values. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
13
SVSim.BattleNode/Bridge/CountryCodes.cs
Normal file
13
SVSim.BattleNode/Bridge/CountryCodes.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace SVSim.BattleNode.Bridge;
|
||||
|
||||
/// <summary>
|
||||
/// Known values for <see cref="MatchContext.CountryCode"/>. NOT a closed set — the field is the
|
||||
/// account's region code copied verbatim from viewer data (any value, possibly empty), and the node
|
||||
/// never branches on it. These constants just name the values seen in the prod captures so test
|
||||
/// fixtures and docs aren't sprinkled with bare <c>"KOR"</c>/<c>"JPN"</c> literals.
|
||||
/// </summary>
|
||||
public static class CountryCodes
|
||||
{
|
||||
public const string Korea = "KOR";
|
||||
public const string Japan = "JPN";
|
||||
}
|
||||
Reference in New Issue
Block a user