Skip to content

Fix the Trader scoring every Megalomaniac as no change - #2564

Open
juddisjudd wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
juddisjudd:fix/megalomaniac-trade-score
Open

juddisjudd wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
juddisjudd:fix/megalomaniac-trade-score

Conversation

@juddisjudd

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

The Trader scores every Megalomaniac listing as no change.

TradeQuery:GetResultEvaluation weighs a Megalomaniac by adding its notables with calcFunc({ addNodes = addedNodes }). It looks each notable up in tree.notableMap and keeps it only when node.recipes ~= nil. The tree names that field recipe (PassiveTree.lua reads node.recipe), so the check never passes, addedNodes stays empty, and the result is the base output.

The check came in with f2b103d, which stopped a crash when a notable was missing from the map on an old tree. The node and part of the check stays, so that case is still skipped.

This change checks node.recipe.

Steps taken to verify a working solution:

Measured by driving TradeQuery headless at 2450f2f. The line is the same on dev.

  • Level 95 Oracle, Megalomaniac row, Full DPS weight 1, 20 listings from Standard. Before: all 20 scored +0.0%. After: the first six scored +30.8% to +41.5%.
  • Level 100 Titan, a hand-written Megalomaniac that allocates Chakra of Thought. Before: weight 1. After: weight 1.158. Adding the same node through GetMiscCalculator gives +15.8% Combined DPS.

Link to a build that showcases this PR:

Any build with an allocated jewel socket. Open the Trader, run "Find best" on the Megalomaniac row and look at the score of each result.

Before screenshot:

Every Megalomaniac result: +0.0%.

After screenshot:

Results score by what their notables add, for example +41.5%.

TradeQuery:GetResultEvaluation weighs a Megalomaniac by adding its notables
with calcFunc({ addNodes = ... }). It looks each one up in tree.notableMap
and keeps only a node whose `recipes` field is set. The tree gives a notable
a `recipe` field, so no node passed the check, nothing was added, and every
Megalomaniac listing scored the same as the build without it.

Check `recipe`, the field the tree sets.
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