Skip to content

Overhaul exchange automation and refactor the codebase - #1

Open
mikkelpetersen wants to merge 1 commit into
ravand1990:mainfrom
mikkelpetersen:feature/automation-overhaul
Open

Overhaul exchange automation and refactor the codebase#1
mikkelpetersen wants to merge 1 commit into
ravand1990:mainfrom
mikkelpetersen:feature/automation-overhaul

Conversation

@mikkelpetersen

Copy link
Copy Markdown

Summary

This PR contains two layers of work on the plugin: a set of automation features built on top of the current main, followed by a full code-quality refactor of the whole codebase.

Feature work

  • Market ratios from panel memory — ratios are read directly from the exchange panel (MarketRateGet/MarketRateGive and the OfferedItemStock competing listings) instead of scraping the ratio tooltip. Optionally lists at the highest competing ratio (Use Highest Competing Ratio), with a Require Sufficient Stock filter.
  • InputHumanizer integration — a Use InputHumanizer toggle routes mouse input through the InputHumanizer plugin when it is loaded, with SyncTask input plumbing pumped in Tick() and controller release once a batch finishes. Keyboard input and the fallback path stay on the plugin's own Win32 SendInput wrappers (layout-independent Unicode typing).
  • Multi-sell — a "Mark" column in the owned-items window queues multiple items and sells them as a batch, capped at the free trade slots (Maximum Concurrent Trades minus placed orders). A stuck item is skipped on timeout instead of aborting the batch.
  • Collect all — collects filled and canceled orders via Ctrl+right-click, verifying inventory space per order (partial-stack aware), pacing collections with a configurable delay because of trade rate limits, and aborting when no progress is made.
  • Runtime UI discovery — all UI elements (sell button, currency select buttons, picker search input, order collect slots) are discovered at runtime by text/geometry instead of hardcoded child indexes.
  • UI/settings overhaul — resizable "Owned Items" window with an optional pin to the exchange panel, one randomized base action delay instead of per-purpose delays, and settings reorganized into Interface/Pricing/Timing/Input/Advanced/Excluded Currencies groups.

Refactor

  • All inline comments replaced with XML documentation on the relevant members.
  • .NET naming conventions applied throughout, including the Win32 interop wrappers; AvailableMarketRatio.cs renamed to MarketRatio.cs; MarketRatio and SellSequenceStep moved into the SellMyShit namespace.
  • Dead code removed (unused sort-header helpers, unused caches and methods, unused enum member).
  • Small fixes: the debug message list is capped at 200 entries, the table's DefaultSort flag follows the configured default sort column, and the wanted-item resolution is null-guarded.
  • All user-facing strings reviewed for proper English grammar.

Testing

  • Builds cleanly with dotnet build (0 errors; only the two pre-existing warnings about obsolete ExileCore APIs).
  • Sell, batch-sell, and collect sequences verified in-game against the live currency exchange panel during development.

🤖 Generated with Claude Code

Feature work:
- Read market ratios directly from exchange panel memory instead of
  tooltip scraping; optionally list at the highest competing ratio,
  with a sufficient-stock requirement
- Integrate InputHumanizer (UseInputHumanizer toggle) with SyncTask
  input plumbing pumped in Tick(); keyboard input and the fallback
  path stay on the plugin's own Win32 SendInput wrappers
- Multi-sell: mark owned items and sell them as a queued batch capped
  at the free trade slots
- Collect all: Ctrl+right-click collection of filled and canceled
  orders with inventory-space verification and rate-limit pacing
- Discover UI elements at runtime (no hardcoded child indexes) and
  reorganize the settings into logical groups

Refactor:
- Replace all inline comments with XML documentation
- Apply .NET naming conventions throughout, including the Win32
  interop wrappers; rename AvailableMarketRatio.cs to MarketRatio.cs
- Remove dead code (unused sort-header helpers, caches, and methods)
- Cap the debug message list, honor the configured default sort
  column, and null-guard the wanted-item resolution
- Review all user-facing strings for proper English grammar

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant