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:
@@ -59,7 +59,7 @@ public static class ServerBattleFrames
|
||||
SelfInfo: new BattleStartSelfInfo(
|
||||
Rank: BattleFrameDefaults.PlayerRank,
|
||||
BattlePoint: BattleFrameDefaults.PlayerBattlePoint,
|
||||
ClassId: selfCtx.ClassId,
|
||||
ClassId: selfCtx.ClassId.ToWireValue(),
|
||||
CharaId: selfCtx.CharaId,
|
||||
CardMasterName: selfCtx.CardMasterName),
|
||||
OppoInfo: new BattleStartOppoInfo(
|
||||
@@ -69,7 +69,7 @@ public static class ServerBattleFrames
|
||||
IsMasterRank: "0",
|
||||
BattlePoint: 0,
|
||||
MasterPoint: "0",
|
||||
ClassId: oppoCtx.ClassId,
|
||||
ClassId: oppoCtx.ClassId.ToWireValue(),
|
||||
CharaId: oppoCtx.CharaId,
|
||||
CardMasterName: oppoCtx.CardMasterName)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user