From 24c10a971362899e9fa18a3d8cbe5cfe4283f3f2 Mon Sep 17 00:00:00 2001 From: status102 <102887808+status102@users.noreply.github.com> Date: Mon, 23 Feb 2026 20:04:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(wpf):=20=E8=82=89=E9=B8=BD=E7=83=A7?= =?UTF-8?q?=E6=B0=B4=E5=8F=82=E6=95=B0=E5=9C=A8=E7=89=B9=E5=AE=9A=E6=83=85?= =?UTF-8?q?=E5=86=B5=E6=9C=AA=E8=83=BD=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RoguelikeSettingsUserControlModel.cs | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/RoguelikeSettingsUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/RoguelikeSettingsUserControlModel.cs index 0c784c3c86..a3ecc057b6 100644 --- a/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/RoguelikeSettingsUserControlModel.cs +++ b/src/MaaWpfGui/ViewModels/UserControl/TaskQueue/RoguelikeSettingsUserControlModel.cs @@ -1111,28 +1111,27 @@ public class RoguelikeSettingsUserControlModel : TaskSettingsViewModel, Roguelik StartWithSeed = roguelike.StartWithSeed ? roguelike.Seed : null, }; - if (Instance.RoguelikeMode == Mode.Collectible && !Instance.RoguelikeOnlyStartWithEliteTwo) + bool squadIsProfessional = roguelike.Mode == Mode.Collectible && roguelike.Theme != Theme.Phantom && roguelike.Squad is "突击战术分队" or "堡垒战术分队" or "远程战术分队" or "破坏战术分队"; + bool roguelikeOnlyStartWithEliteTwo = roguelike.StartWithEliteTwoOnly && roguelike.StartWithEliteTwo && squadIsProfessional; + + if (roguelike.Mode == Mode.Collectible && !roguelikeOnlyStartWithEliteTwo) { var rewardKeys = new Dictionary { - { RoguelikeCollectibleAward.HotWater, "hot_water" }, - { RoguelikeCollectibleAward.Shield, "shield" }, - { RoguelikeCollectibleAward.Ingot, "ingot" }, - { RoguelikeCollectibleAward.Hope, "hope" }, - { RoguelikeCollectibleAward.Random, "random" }, - { RoguelikeCollectibleAward.Key, "key" }, - { RoguelikeCollectibleAward.Dice, "dice" }, - { RoguelikeCollectibleAward.Idea, "ideas" }, - { RoguelikeCollectibleAward.Ticket, "ticket" }, - }; + { RoguelikeCollectibleAward.HotWater, "hot_water" }, + { RoguelikeCollectibleAward.Shield, "shield" }, + { RoguelikeCollectibleAward.Ingot, "ingot" }, + { RoguelikeCollectibleAward.Hope, "hope" }, + { RoguelikeCollectibleAward.Random, "random" }, + { RoguelikeCollectibleAward.Key, "key" }, + { RoguelikeCollectibleAward.Dice, "dice" }, + { RoguelikeCollectibleAward.Idea, "ideas" }, + { RoguelikeCollectibleAward.Ticket, "ticket" }, + }; - var startWithSelect = new JObject(); - foreach (var select in Instance.RoguelikeStartWithSelectList.Cast>()) + foreach (var reward in rewardKeys.Keys) { - if (rewardKeys.TryGetValue(select.Value, out var paramKey)) - { - task.CollectibleModeStartRewards[paramKey] = true; - } + task.CollectibleModeStartRewards[rewardKeys[reward]] = roguelike.CollectibleStartAwards.HasFlag(reward); } }