From 1078b1ef50d9956b28f25927dbc9b28e141b105f Mon Sep 17 00:00:00 2001 From: gamer147 Date: Sat, 6 Jun 2026 01:03:58 -0400 Subject: [PATCH] =?UTF-8?q?port(m1):=20wave=207k=20=E2=80=94=20M1=20COMPLE?= =?UTF-8?q?TE:=200=20compile=20errors,=20headless=20engine=20builds=20(12-?= =?UTF-8?q?>0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- SVSim.BattleEngine/COPIED.manifest.tsv | 4 +- SVSim.BattleEngine/Engine/UICardList.cs | 4 +- .../Engine/Wizard.RoomMatch/RoomParamKey.cs | 242 ++++++++++++++++++ .../CardChooseTask.cs | 39 +++ ...ardList.SetCardNumLabel-param-rename.patch | 15 ++ .../Shim/View/SettingsUiStubs.cs | 2 +- 6 files changed, 302 insertions(+), 4 deletions(-) create mode 100644 SVSim.BattleEngine/Engine/Wizard.RoomMatch/RoomParamKey.cs create mode 100644 SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.Arena.TwoPick/CardChooseTask.cs create mode 100644 SVSim.BattleEngine/Patches/UICardList.SetCardNumLabel-param-rename.patch diff --git a/SVSim.BattleEngine/COPIED.manifest.tsv b/SVSim.BattleEngine/COPIED.manifest.tsv index 285d1ac..89bf159 100644 --- a/SVSim.BattleEngine/COPIED.manifest.tsv +++ b/SVSim.BattleEngine/COPIED.manifest.tsv @@ -1401,7 +1401,7 @@ UIButton.cs UIButton.cs 6daadb36b071d0759d354c0368383bbc8fc7c7a419be5236a0a576e6 UIButtonColor.cs UIButtonColor.cs 527c1e1d9db0da61cdc0348e893b3df2bef7fadd046b9079abeb5641483da7b0 0 UIButtonExtension.cs UIButtonExtension.cs d5388ce532378ccb676a8c16bc1656e2d9f2ca81097bba2195f59692c12f17b5 0 UICamera.cs UICamera.cs 500eb9bb8f8bf4e7ed1f0073de80c5ccefe85273db00fc887295153d533c6525 0 -UICardList.cs UICardList.cs 0c983d56f955b25b0e0d52b4b1ce7c4a51b175093770c24c66db0ca575abc288 0 +UICardList.cs UICardList.cs 1806cbaae01b88b8cb07c43c9c54e07eb4d726365755a03346308c0ffa8440d1 1 UICenterOnChild.cs UICenterOnChild.cs 474da8b0e6bab01a59538a47351a71f3a3564f9242c37a9adb29419dcaf91ee1 0 UICenterOnClick.cs UICenterOnClick.cs f6fd08e24ca2e897bcbd22568be224eb3d7bae06f898d66fcd34f5fc20419178 0 UICurveLabel.cs UICurveLabel.cs e7eb2389c940c26327f302d9c11863726a359d46c85a5ad5a0d5d5e44cbe5d8d 0 @@ -1679,6 +1679,7 @@ Wizard.Lottery\LotteryRewardData.cs Wizard.Lottery\LotteryRewardData.cs 27fadecd Wizard.Lottery\LotterySpecialRewardDialog.cs Wizard.Lottery\LotterySpecialRewardDialog.cs e0081b816349f36c61bf8f82f4a4dc461258da6dd89f9877a15bf43942677792 0 Wizard.Lottery\LotteryTreasureBox.cs Wizard.Lottery\LotteryTreasureBox.cs 9eafd4ea6ea090d35cfa571b6e9b0f86d28a5f9515cdc5365588b32789bee88c 0 Wizard.QuestSpecialResult\QuestAssetManager.cs Wizard.QuestSpecialResult\QuestAssetManager.cs 13ae6dae3eb9d98368e13a0435e061fa70f0b8a5965c591e3bd41ff16d452947 0 +Wizard.RoomMatch/RoomParamKey.cs Wizard.RoomMatch/RoomParamKey.cs 3379dd5de06cd1d204f97118b9a24697776a1301bf842f1301675d4f4d86c936 0 Wizard.Scripts.Network.Data.TableData.Arena.TwoPick\CandidateCard.cs Wizard.Scripts.Network.Data.TableData.Arena.TwoPick\CandidateCard.cs b89c513435bb4d68607d6d0e5ee95a76144fd0fccb5abdb58b1a73ffed9a7309 0 Wizard.Scripts.Network.Data.TableData.Arena.TwoPick\CandidateChaos.cs Wizard.Scripts.Network.Data.TableData.Arena.TwoPick\CandidateChaos.cs cfb1306d5d36d0221864b7302fa4f4949faa16c8cd0c4a6421b681e6326b0d96 0 Wizard.Scripts.Network.Data.TableData.Arena.TwoPick\CandidateClass.cs Wizard.Scripts.Network.Data.TableData.Arena.TwoPick\CandidateClass.cs 1f202e563482a99757b7d6755f8358f7a5efb618eb4efc000b679fc17c7558a1 0 @@ -1727,6 +1728,7 @@ Wizard.Scripts.Network.Data.TaskData.SpotCardExchange\SpotCardExchangeInfoTask.c Wizard.Scripts.Network.Data.TaskData.SpotCardExchange\SpotCardExchangeTask.cs Wizard.Scripts.Network.Data.TaskData.SpotCardExchange\SpotCardExchangeTask.cs 53581da430a338cb178b66c999b918e94ad9910b1f3a817fef051cdd779aecd2 0 Wizard.Scripts.Network.Data.TaskData\ItemAcquireHistoryInfo.cs Wizard.Scripts.Network.Data.TaskData\ItemAcquireHistoryInfo.cs 4c472401abcddb81bf2cdaaddc6ed0ade73d7da1dfb9f67c3452ee5a4c969723 0 Wizard.Scripts.Network.Task.Arena.Competition\CardChooseTask.cs Wizard.Scripts.Network.Task.Arena.Competition\CardChooseTask.cs 93ccfceafd67e9942a7b317b90451bd68c55797e495216c6b44bb1e8638938f4 0 +Wizard.Scripts.Network.Task.Arena.TwoPick/CardChooseTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick/CardChooseTask.cs 90813f49ebcdbd86c744c0314fa8c33cfecf1ac3b25654a6bc9bd1d42efe8a2f 0 Wizard.Scripts.Network.Task.Arena.TwoPick\ClassCharaChooseTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\ClassCharaChooseTask.cs 8bcdf7ed2a08f985de5f275fa170b78dfb1a8e2476dfca944dd7247d6af7d8bd 0 Wizard.Scripts.Network.Task.Arena.TwoPick\EntryTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\EntryTask.cs de7966ee9b54fcd6253410cdd68fd4a77913ac149f28855041c751927e424dcd 0 Wizard.Scripts.Network.Task.Arena.TwoPick\FinishTask.cs Wizard.Scripts.Network.Task.Arena.TwoPick\FinishTask.cs 681c3bdb8be55a1f506cccdfd59b3e7f0af81516678797449e868fdef781d96a 0 diff --git a/SVSim.BattleEngine/Engine/UICardList.cs b/SVSim.BattleEngine/Engine/UICardList.cs index 417b95b..250c48f 100644 --- a/SVSim.BattleEngine/Engine/UICardList.cs +++ b/SVSim.BattleEngine/Engine/UICardList.cs @@ -875,10 +875,10 @@ public class UICardList : MonoBehaviour SetCardNumLabel(_useSubClassMainClassCardNumLabel, num, isRed: false); SetCardNumLabel(_useSubClassSubClassCardNumLabel, num2, isRed: false); } - static void SetCardNumLabel(UILabel label, int num3, bool flag) + static void SetCardNumLabel(UILabel label, int num3, bool isRed) { label.text = num3.ToString(); - label.color = (flag ? LabelDefine.TEXT_COLOR_RED : LabelDefine.TEXT_COLOR_NORMAL); + label.color = (isRed ? LabelDefine.TEXT_COLOR_RED : LabelDefine.TEXT_COLOR_NORMAL); } } diff --git a/SVSim.BattleEngine/Engine/Wizard.RoomMatch/RoomParamKey.cs b/SVSim.BattleEngine/Engine/Wizard.RoomMatch/RoomParamKey.cs new file mode 100644 index 0000000..6d89b7a --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.RoomMatch/RoomParamKey.cs @@ -0,0 +1,242 @@ +using System; +using System.Collections.Generic; + +namespace Wizard.RoomMatch; + +public static class RoomParamKey +{ + public static class RoomEntry + { + public const string USER_NAME = "userName"; + + public const string EMBLEM_ID = "emblemId"; + + public const string DEGREE_ID = "degreeId"; + + public const string COUNTRY_CODE = "countryCode"; + + public const string RANK = "rank"; + + public const string MAX_RANK = "maxRank"; + + public const string IS_FRIEND = "isFriend"; + + public const string IS_GUILD_MEMBER = "isGuildMember"; + + public const string IS_GUILD_JOINED = "isGuildJoined"; + + public const string OPPONENT_ID = "oppoId"; + } + + public static class ChatStamp + { + public const string CHAT_STAMP = "chatStamp"; + + public const string STAMP = "stamp"; + } + + public static class RoomNotify + { + public const string NOTIFY = "notify"; + + public const string RETRY_DECK_CREATE = "retry_deck_create"; + + public const string DRAFT_DECK_RESET = "draftDeckReset"; + } + + public static class BeginCreateDeck + { + public const string CANDIDATE_CLASS_IDS = "candidateClassIds"; + + public const string CLASS_ID_1 = "classId1"; + + public const string CLASS_ID_2 = "classId2"; + + public const string CLASS_ID_3 = "classId3"; + + public const string CHARA_ID_1 = "charaId1"; + + public const string CHARA_ID_2 = "charaId2"; + + public const string CHARA_ID_3 = "charaId3"; + + public const string CHAOS_ID_1 = "chaosId1"; + + public const string CHAOS_ID_2 = "chaosId2"; + + public const string CHAOS_ID_3 = "chaosId3"; + + public const string CHAOS_USABLE_CLASS_IDS_1 = "usableClassIds1"; + + public const string CHAOS_USABLE_CLASS_IDS_2 = "usableClassIds2"; + + public const string CHAOS_USABLE_CLASS_IDS_3 = "usableClassIds3"; + } + + public static class SelectClass + { + public const string CLASS_INFO = "classInfo"; + + public const string SELECTED_CLASS_ID = "selectedClassId"; + + public const string SELECTED_CHARA_ID = "selectedCharaId"; + + public const string SELECTED_CHAOS_ID = "selectedChaosId"; + + public const string SELECTED_CARD_IDS = "selected_card_ids"; + } + + public static class DeckEntry + { + public const string DECK_LIST = "deckList"; + } + + public static class MultiDeckBan + { + public const string DECIDE_BAN_DECK = "banDeckIdxList"; + } + + public static class InitWatch + { + public static class DeckList + { + public const string CLASS_ID = "classId"; + + public const string SUB_CLASS_ID = "subclassId"; + + public const string SLEEVE_ID = "sleeveId"; + + public const string CHARA_ID = "charaId"; + + public const string DECK_ID = "deckId"; + + public const string CARD_ID_LIST = "cardIdList"; + + public const string MY_ROTATION_ID = "rotationId"; + } + + public const string LEAVE_COUNT = "leaveCount"; + + public const string WAIT_TIME = "waitTime"; + + public const string DECK_LIST = "deckList"; + + public const string USER_LIST = "userInfoList"; + + public const string BAN_DECK = "banDeckIdxList"; + + public const string TURN_SELECT = "turnSelect"; + } + + public static class BattleNum + { + public const string BATTLE_NUM = "battleNum"; + + public const string OWNER_WIN = "ownerWin"; + + public const string GUEST_WIN = "guestWin"; + } + + public static class Watch + { + public static class PlayList + { + public const string SEQUENCE = "seq"; + + public const string VIEWER_ID = "vid"; + + public const string TURN_SELECT = "turnSelect"; + } + + public const string LEAVE_COUNT = "leaveCount"; + + public const string RELEASE = "release"; + + public const string USER_INFO = "userInfo"; + + public const string ROOM_INFO = "roomInfo"; + + public const string BATTLE_NUM = "battleNum"; + + public const string FIRST_TURN = "firstTurn"; + + public const string USER_INFO_LIST = "uinfoList"; + + public const string FIELD_ID = "fieldId"; + + public const string SEED = "seed"; + + public const string PLAY_LIST_ROOM = "playlist_room"; + } + + public static class TwoPickDeckInfo + { + public const string TWO_PICK_DECK_INFO = "deckInfo"; + + public const string CANDIDATE_CARD_LIST = "candidateCardList"; + + public const string DECK_NUMBER = "deckNumber"; + + public const string DECK_FINISH = "isFinish"; + + public const string CLASS_ID = "classId"; + + public const string SKIN_ID = "skinId"; + + public const string CARD_IDS = "cardIds"; + + public const string CHAOS_ID = "chaosId"; + + public const string TURN = "turn"; + + public const string CARD_ID_1 = "cardId1"; + + public const string CARD_ID_2 = "cardId2"; + + public const string IS_SELF = "isSelf"; + } + + public static class WatchSendParam + { + public const string USERS = "users"; + + public const string W_SEQ = "wSeq"; + + public const string VIEWER_ID = "viewerId"; + } + + public static class Recovery + { + public const string NEED_MULTI_DECK_CLEAR = "isMultiInitialize"; + } + + public const string URI = "uri"; + + public const string IS_FORCE = "isForce"; + + public const string PLAY_SEQ = "playSeq"; + + public const string RETRY = "retry"; + + public const string TURN_SELECT = "turnSelect"; + + public const string USER_STATE = "userState"; + + public static readonly Dictionary UriNames; + + public static readonly Dictionary WatchUriNames; + + static RoomParamKey() + { + UriNames = new Dictionary(Enum.GetValues(typeof(PlayerController.ROOM_URI)).Length); + foreach (PlayerController.ROOM_URI value in Enum.GetValues(typeof(PlayerController.ROOM_URI))) + { + UriNames[value] = Enum.GetName(typeof(PlayerController.ROOM_URI), value); + } + WatchUriNames = new Dictionary(Enum.GetValues(typeof(PlayerControllerForWatching.SEND_PARAMETER)).Length); + foreach (PlayerControllerForWatching.SEND_PARAMETER value2 in Enum.GetValues(typeof(PlayerControllerForWatching.SEND_PARAMETER))) + { + WatchUriNames[value2] = Enum.GetName(typeof(PlayerControllerForWatching.SEND_PARAMETER), value2); + } + } +} diff --git a/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.Arena.TwoPick/CardChooseTask.cs b/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.Arena.TwoPick/CardChooseTask.cs new file mode 100644 index 0000000..bdb5597 --- /dev/null +++ b/SVSim.BattleEngine/Engine/Wizard.Scripts.Network.Task.Arena.TwoPick/CardChooseTask.cs @@ -0,0 +1,39 @@ +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; + } +} diff --git a/SVSim.BattleEngine/Patches/UICardList.SetCardNumLabel-param-rename.patch b/SVSim.BattleEngine/Patches/UICardList.SetCardNumLabel-param-rename.patch new file mode 100644 index 0000000..da144b6 --- /dev/null +++ b/SVSim.BattleEngine/Patches/UICardList.SetCardNumLabel-param-rename.patch @@ -0,0 +1,15 @@ +Decompiler artifact: the local function `SetCardNumLabel(UILabel, int, bool)` had its +third parameter recovered as `flag`, but the (also-decompiled) call sites pass it by the +named argument `isRed:` (lines 875-876). Param name vs. named-arg mismatch -> CS1739. + +Mechanical fix (zero logic change): rename the parameter `flag` -> `isRed` and its single +use in the body. No behavior change. + +--- Engine/UICardList.cs (local fn ~line 878) +- static void SetCardNumLabel(UILabel label, int num3, bool flag) ++ static void SetCardNumLabel(UILabel label, int num3, bool isRed) + { + label.text = num3.ToString(); +- label.color = (flag ? LabelDefine.TEXT_COLOR_RED : LabelDefine.TEXT_COLOR_NORMAL); ++ label.color = (isRed ? LabelDefine.TEXT_COLOR_RED : LabelDefine.TEXT_COLOR_NORMAL); + } diff --git a/SVSim.BattleEngine/Shim/View/SettingsUiStubs.cs b/SVSim.BattleEngine/Shim/View/SettingsUiStubs.cs index cf39f97..d048b48 100644 --- a/SVSim.BattleEngine/Shim/View/SettingsUiStubs.cs +++ b/SVSim.BattleEngine/Shim/View/SettingsUiStubs.cs @@ -100,7 +100,7 @@ namespace Wizard.Story.ChapterSelection.SelectionProcessing.BattleResult namespace Wizard.RoomMatch { - public partial class PlayerControllerForWatching { } + public partial class PlayerControllerForWatching { } // SEND_PARAMETER enum is in Generated/PlayerControllerForWatching.g.cs public partial class RoomRuleSetting { } }