fix: 修复剿灭模式下任务失败时备选关卡为未在列表的主线关卡被跳过的问题

fix #4543
This commit is contained in:
uye
2023-04-29 23:24:03 +08:00
parent 7e34556835
commit b362fbfcf0
2 changed files with 6 additions and 3 deletions

View File

@@ -323,6 +323,7 @@ namespace MaaWpfGui.Services
public StageInfo GetStageInfo(string stage)
{
_stages.TryGetValue(stage, out var stageInfo);
stageInfo ??= new StageInfo { Display = stage, Value = stage };
return stageInfo;
}

View File

@@ -840,13 +840,15 @@ namespace MaaWpfGui.ViewModels.UI
}
}
bool mainFightRet = Instances.AsstProxy.AsstAppendFight(Stage, medicine, stone, times, DropsItemId, drops_quantity);
string curStage = Stage;
if (mainFightRet && (Stage == "Annihilation") && Instances.SettingsViewModel.UseAlternateStage)
bool mainFightRet = Instances.AsstProxy.AsstAppendFight(curStage, medicine, stone, times, DropsItemId, drops_quantity);
if (mainFightRet && (curStage == "Annihilation") && Instances.SettingsViewModel.UseAlternateStage)
{
foreach (var stage in new[] { Stage1, Stage2, Stage3 })
{
if (IsStageOpen(stage) && (stage != Stage))
if (IsStageOpen(stage) && (stage != curStage))
{
mainFightRet = Instances.AsstProxy.AsstAppendFight(stage, medicine, 0, int.MaxValue, string.Empty, 0);
}