Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.Arena.TwoPick/CardChooseTask.cs
gamer147 1078b1ef50 port(m1): wave 7k — M1 COMPLETE: 0 compile errors, headless engine builds (12->0)
Final three clusters:
- RoomParamKey: copy Wizard.RoomMatch/RoomParamKey.cs verbatim (UriNames/WatchUriNames
  static dicts keyed by PlayerController.ROOM_URI + PlayerControllerForWatching.
  SEND_PARAMETER — both now real enums).
- CardChooseTask: copy the TwoPick/CardChooseTask.cs (TaskManager `using`s .Arena.TwoPick,
  not .Competition — copy_loop had only landed the Competition twin).
- SetCardNumLabel CS1739: decompiler param-name artifact — the local fn's 3rd param was
  recovered as `flag` but call sites pass it named `isRed:`. First DP5 tracked patch:
  Engine/UICardList.cs edited (flag->isRed, zero logic change), recorded in
  Patches/ + manifest patched=1 (drift-clean).

M1 exit criteria met: `dotnet build SVSim.BattleEngine` = 0 errors, no Unity ref in csproj,
check_drift clean. Session 7: 198 -> 0 across waves 7a-7k.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 01:03:58 -04:00

40 lines
970 B
C#

using LitJson;
namespace Wizard.Scripts.Network.Task.Arena.TwoPick;
public class CardChooseTask : BaseTask
{
public class ArenaTwoPickCardChooseTaskParam : BaseParam
{
public int selected_id;
}
public CardChooseTask()
{
base.type = ApiType.Type.ArenaTwoPickCardChoose;
}
public void SetParameter(int selected_id)
{
ArenaTwoPickCardChooseTaskParam arenaTwoPickCardChooseTaskParam = new ArenaTwoPickCardChooseTaskParam();
arenaTwoPickCardChooseTaskParam.selected_id = selected_id;
base.Params = arenaTwoPickCardChooseTaskParam;
}
protected override int Parse()
{
int num = base.Parse();
if (num != 1)
{
return num;
}
JsonData jsonData = base.ResponseData["data"];
Wizard.Data.TwoPickInfo.SetDeckInfo(jsonData["deck_info"]);
if (!Wizard.Data.TwoPickInfo.deckInfo.isSelectCompleted)
{
Wizard.Data.TwoPickInfo.SetCandidateCardList(jsonData["candidate_card_list"]);
}
return num;
}
}