tweaks
This commit is contained in:
parent
657d307485
commit
566dae8997
6 changed files with 72 additions and 60 deletions
|
|
@ -129,37 +129,15 @@ public class KulemakExecutor : MappingExecutor
|
|||
}
|
||||
await Sleep(Delays.PostStashOpen);
|
||||
|
||||
// Scan inventory now that stash (and inventory panel) is open
|
||||
var scanResult = await _inventory.SnapshotInventory();
|
||||
|
||||
if (scanResult.Occupied.Count > 0)
|
||||
var (lootTab, lootFolder) = ResolveTabPath(_config.Kulemak.LootTabPath);
|
||||
if (lootTab == null)
|
||||
{
|
||||
var (lootTab, lootFolder) = ResolveTabPath(_config.Kulemak.LootTabPath);
|
||||
if (lootTab != null)
|
||||
{
|
||||
await _inventory.ClickStashTab(lootTab, lootFolder);
|
||||
|
||||
Log.Information("Depositing {Count} inventory items to loot tab", scanResult.Occupied.Count);
|
||||
await _game.KeyDown(InputSender.VK.SHIFT);
|
||||
await _game.HoldCtrl();
|
||||
foreach (var cell in scanResult.Occupied)
|
||||
{
|
||||
var center = _screen.Grid.GetCellCenter(GridLayouts.Inventory, cell.Row, cell.Col);
|
||||
await _game.LeftClickAt(center.X, center.Y);
|
||||
await Sleep(Delays.ClickInterval);
|
||||
}
|
||||
await _game.ReleaseCtrl();
|
||||
await _game.KeyUp(InputSender.VK.SHIFT);
|
||||
await Sleep(Delays.PostEscape);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Warning("Loot tab path not configured or not found, skipping deposit");
|
||||
}
|
||||
Log.Warning("Loot tab path not configured or not found, skipping deposit");
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Information("Inventory empty, skipping loot deposit");
|
||||
await _inventory.ClickStashTab(lootTab, lootFolder);
|
||||
await _inventory.DepositAllToOpenStash();
|
||||
}
|
||||
|
||||
if (invTab != null)
|
||||
|
|
@ -465,30 +443,7 @@ public class KulemakExecutor : MappingExecutor
|
|||
if (lootTab != null)
|
||||
await _inventory.ClickStashTab(lootTab, lootFolder);
|
||||
|
||||
for (var pass = 0; pass < 3; pass++)
|
||||
{
|
||||
var scanResult = await _inventory.SnapshotInventory();
|
||||
if (scanResult.Items.Count == 0)
|
||||
{
|
||||
if (pass > 0) Log.Information("Inventory clear after {Pass} passes", pass);
|
||||
break;
|
||||
}
|
||||
|
||||
Log.Information("Depositing {Count} items to loot tab (pass {Pass})", scanResult.Items.Count, pass + 1);
|
||||
await _game.KeyDown(InputSender.VK.SHIFT);
|
||||
await _game.HoldCtrl();
|
||||
|
||||
foreach (var item in scanResult.Items)
|
||||
{
|
||||
var center = _screen.Grid.GetCellCenter(GridLayouts.Inventory, item.Row, item.Col);
|
||||
await _game.LeftClickAt(center.X, center.Y);
|
||||
await Sleep(Delays.ClickInterval);
|
||||
}
|
||||
|
||||
await _game.ReleaseCtrl();
|
||||
await _game.KeyUp(InputSender.VK.SHIFT);
|
||||
await Sleep(Delays.PostEscape);
|
||||
}
|
||||
await _inventory.DepositAllToOpenStash();
|
||||
|
||||
// Grab 1 invitation for the next run while stash is still open
|
||||
if (grabInvitation)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue