diff --git a/SysBot.Pokemon/SWSH/BotEncounter/EncounterBot.cs b/SysBot.Pokemon/SWSH/BotEncounter/EncounterBot.cs index 14b052dc..8bc82731 100644 --- a/SysBot.Pokemon/SWSH/BotEncounter/EncounterBot.cs +++ b/SysBot.Pokemon/SWSH/BotEncounter/EncounterBot.cs @@ -67,7 +67,7 @@ public override async Task HardStop() protected abstract Task EncounterLoop(SAV8SWSH sav, CancellationToken token); // return true if breaking loop - protected async Task HandleEncounter(PK8? pk, CancellationToken token) + protected async Task HandleEncounter(PK8? pk, CancellationToken token, bool isLair = false) { if (pk == null) return false; @@ -89,7 +89,7 @@ protected async Task HandleEncounter(PK8? pk, CancellationToken token) if (!StopConditionSettings.EncounterFound(pk, DesiredMinIVs, DesiredMaxIVs, Hub.Config.StopConditions, WantedNatures, UnwantedMarks)) return false; - if (Hub.Config.StopConditions.CaptureVideoClip) + if (Hub.Config.StopConditions.CaptureVideoClip && !isLair) { await Task.Delay(Hub.Config.StopConditions.ExtraTimeWaitCaptureVideo, token).ConfigureAwait(false); await PressAndHold(CAPTURE, 2_000, 0, token).ConfigureAwait(false); diff --git a/SysBot.Pokemon/SWSH/BotEncounter/EncounterBotLair.cs b/SysBot.Pokemon/SWSH/BotEncounter/EncounterBotLair.cs index 94cdeaf0..b33b4f31 100644 --- a/SysBot.Pokemon/SWSH/BotEncounter/EncounterBotLair.cs +++ b/SysBot.Pokemon/SWSH/BotEncounter/EncounterBotLair.cs @@ -45,7 +45,6 @@ protected override async Task EncounterLoop(SAV8SWSH sav, CancellationToken toke private async Task InnerLoop(CancellationToken token) { var target = Settings.MaxLairSettings.EditLairPath; - var wasVideoClipActive = Hub.Config.StopConditions.CaptureVideoClip; Stopwatch stopwatch = new(); bool caneditspecies = true; uint pathoffset = LairSpeciesSelector; @@ -89,10 +88,6 @@ private async Task InnerLoop(CancellationToken token) while (!token.IsCancellationRequested) { - //Capture video clip is menaged internally - if (wasVideoClipActive) - Hub.Config.StopConditions.CaptureVideoClip = false; - //Talk to the Lady while (!await IsInLairWait(token).ConfigureAwait(false)) await Click(A, 0_500, token).ConfigureAwait(false); @@ -183,11 +178,8 @@ private async Task InnerLoop(CancellationToken token) await Click(A, 0_900, token).ConfigureAwait(false); await Click(DDOWN, 0_800, token).ConfigureAwait(false); await Click(A, 2_300, token).ConfigureAwait(false); - if (wasVideoClipActive == true) - { + if (Hub.Config.StopConditions.CaptureVideoClip == true) await PressAndHold(CAPTURE, 2_000, 10_000, token).ConfigureAwait(false); - Hub.Config.StopConditions.CaptureVideoClip = true; - } if (pk != null && found[2] == 1) { @@ -243,7 +235,7 @@ private async Task IsAdventureHuntFound(CancellationToken token) found[1] = 1; } - if(await HandleEncounter(pkm, token).ConfigureAwait(false)) + if(await HandleEncounter(pkm, token, true).ConfigureAwait(false)) { found[0] = i + 1; enc_conditions = true;