work on first boss
This commit is contained in:
parent
053a016c8b
commit
89c3a0a077
16 changed files with 702 additions and 150 deletions
|
|
@ -15,6 +15,8 @@ public class InventoryManager : IInventoryManager
|
|||
|
||||
private bool _atOwnHideout = true;
|
||||
private string _sellerAccount = "";
|
||||
private string? _currentFolder;
|
||||
private string? _currentTab;
|
||||
private readonly IGameController _game;
|
||||
private readonly IScreenReader _screen;
|
||||
private readonly IClientLogWatcher _logWatcher;
|
||||
|
|
@ -344,7 +346,17 @@ public class InventoryManager : IInventoryManager
|
|||
|
||||
public async Task ClickStashTab(StashTabInfo tab, StashTabInfo? parentFolder = null)
|
||||
{
|
||||
if (parentFolder != null)
|
||||
var folderName = parentFolder?.Name;
|
||||
var tabName = tab.Name;
|
||||
|
||||
// Already on the right folder and tab — skip
|
||||
if (_currentFolder == folderName && _currentTab == tabName)
|
||||
{
|
||||
Log.Debug("Already on tab '{Tab}' (folder '{Folder}'), skipping", tabName, folderName ?? "none");
|
||||
return;
|
||||
}
|
||||
|
||||
if (parentFolder != null && _currentFolder != folderName)
|
||||
{
|
||||
Log.Information("Clicking folder '{Folder}' at ({X},{Y})", parentFolder.Name, parentFolder.ClickX, parentFolder.ClickY);
|
||||
await _game.LeftClickAt(parentFolder.ClickX, parentFolder.ClickY);
|
||||
|
|
@ -354,6 +366,15 @@ public class InventoryManager : IInventoryManager
|
|||
Log.Information("Clicking tab '{Tab}' at ({X},{Y})", tab.Name, tab.ClickX, tab.ClickY);
|
||||
await _game.LeftClickAt(tab.ClickX, tab.ClickY);
|
||||
await Helpers.Sleep(Delays.PostStashOpen);
|
||||
|
||||
_currentFolder = folderName;
|
||||
_currentTab = tabName;
|
||||
}
|
||||
|
||||
public void ResetStashTabState()
|
||||
{
|
||||
_currentFolder = null;
|
||||
_currentTab = null;
|
||||
}
|
||||
|
||||
public async Task GrabItemsFromStash(string layoutName, int maxItems, string? templatePath = null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue