boss getting close
This commit is contained in:
parent
f914443d86
commit
aee3a7f22c
19 changed files with 422 additions and 119 deletions
|
|
@ -1,6 +1,8 @@
|
|||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using Poe2Trade.Bot;
|
||||
using Poe2Trade.Core;
|
||||
using Poe2Trade.Game;
|
||||
using Poe2Trade.Screen;
|
||||
using Serilog;
|
||||
|
||||
|
|
@ -317,6 +319,38 @@ public partial class DebugViewModel : ObservableObject
|
|||
: $"Burst capture OFF — {_bot.FrameSaver.SavedCount} frames saved";
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private async Task DebugPortal()
|
||||
{
|
||||
try
|
||||
{
|
||||
DebugResult = "Portal debug: focusing game...";
|
||||
await _bot.Game.FocusGame();
|
||||
await Helpers.Sleep(Delays.PostFocus);
|
||||
|
||||
// Open portal
|
||||
await _bot.Game.PressPlus();
|
||||
await Helpers.Sleep(2000);
|
||||
|
||||
// Run nameplate diff OCR with save
|
||||
var savePath = Path.Combine("debug", "portal-ocr.png");
|
||||
Directory.CreateDirectory("debug");
|
||||
var portalRegion = new System.Drawing.Rectangle(1280 - 600, 100, 1200, 620);
|
||||
var pos = await _bot.Inventory.FindAndClickNameplate(
|
||||
"The Ardura Caravan", maxRetries: 3, retryDelayMs: 1500,
|
||||
scanRegion: portalRegion, savePath: savePath);
|
||||
|
||||
DebugResult = pos.HasValue
|
||||
? $"Found portal at ({pos.Value.X},{pos.Value.Y}), images saved to debug/"
|
||||
: $"Portal not found, OCR images saved to debug/";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
DebugResult = $"Portal debug failed: {ex.Message}";
|
||||
Log.Error(ex, "Portal debug failed");
|
||||
}
|
||||
}
|
||||
|
||||
[RelayCommand]
|
||||
private async Task ClickSalvage()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ public partial class SettingsViewModel : ObservableObject
|
|||
await Helpers.RandomDelay(800, 1200);
|
||||
|
||||
// ANGE opens a dialog — click "Manage Shop"
|
||||
var dialogRegion = new Region(1080, 600, 400, 300);
|
||||
var dialogRegion = new Region(pos.Value.X, pos.Value.Y, 460, 600);
|
||||
var managePos = await _bot.Screen.FindTextInRegion(dialogRegion, "Manage");
|
||||
if (managePos.HasValue)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -327,6 +327,7 @@
|
|||
<Button Content="SALVAGE" Command="{Binding ClickSalvageCommand}" />
|
||||
<Button Content="Attack Test" Command="{Binding AttackTestCommand}" />
|
||||
<Button Content="Loot" Command="{Binding LootTestCommand}" />
|
||||
<Button Content="Portal" Command="{Binding DebugPortalCommand}" />
|
||||
<Button Content="Detection?" Command="{Binding DetectionStatusCommand}" />
|
||||
<Button Content="{Binding BurstCaptureLabel}"
|
||||
Command="{Binding ToggleBurstCaptureCommand}" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue