Repository navigation
Fix radius jewel functions accumulating across mod list rebuilds - #2542
Merged
LocalIdentity merged 1 commit intoSep 29, 2026
Merged
LocalIdentity merged 1 commit into
LocalIdentity merged 1 commit into
Conversation
ItemClass:BuildModListForSlotNum appends every JewelFunc it finds to
self.jewelData.funcList but never clears it, as the `or { }` only creates
the table when it is missing. jewelData is reset in BuildModList, which
runs when the item is parsed, while the append also runs by way of
GetActiveModListForSlotNum, which rebuilds the slot mod lists during
calculation whenever the bonded rune state differs from the cached one.
Every such rebuild leaves another copy of the jewel's radius functions
behind.
CalcSetup then creates one radiusJewelList entry per function, and
refreshJewelStatCache appends each entry's modifiers into the same
per-socket cached list, so a duplicated function applies the jewel's
"Passive Skills in Radius also grant" stats one extra time to every node
in radius. Building the passive tree power report runs a full calculation
pass per node, which multiplies those stats several times over, and the
inflated values then survive until the item is reparsed.
Rebuild the list from the modifiers found in the current pass instead of
appending to whatever was left over. This also stops a jewel from keeping
functions it no longer grants after a variant change.
LocalIdentity
approved these changes
Sep 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the problem being solved:
A jewel's radius functions are appended to
self.jewelData.funcListinItemClass:BuildModListForSlotNum(src/Classes/Item.lua), and the list is never cleared — theor { }only creates the table when it is missing:jewelDatais only reset inItemClass:BuildModList, which runs when the item is parsed. The append, however, also runs by way ofItemClass:GetActiveModListForSlotNum, which rebuilds the slot mod lists during calculation whenever the bonded rune state differs from the cached one. Every one of those rebuilds leaves another copy of the jewel's functions behind.CalcSetupthen creates oneradiusJewelListentry per function, andrefreshJewelStatCacheappends each entry's modifiers into the same per-socket cached list. A duplicated function therefore applies the jewel's "Passive Skills in Radius also grant" stats one extra time to every node in radius.Building the passive tree power report runs a full calculation pass per node, so it multiplies the stats several times over in one go, and the inflated values survive every later recalculation — only reimporting the tree (which reparses the items) clears them.
When this was introduced
The append itself is long-standing and is present in the released code too, but it is harmless there. On
masterand in v0.23.1,BuildModListForSlotNumis only ever reached fromBuildModList, which clearsself.jewelDataimmediately beforehand, so each rebuild leaves exactly one copy of the functions behind.The second call path arrived on
devwith 1bcdb48 ("Add Martial Artist Rune slots", #1991, 2026-08-31), which addedItemClass:GetActiveModListForSlotNumand has it callBuildModListsForSlotsduring calculation without resettingjewelData.mastercontains noactiveBondedStateat all, and the commit postdates the v0.23.1 release (2026-07-28).The regression is therefore unreleased: it affects
devonly, no released version is impacted, and this does not need backporting.Reproduction
The build this was found on uses a Spirit Glimmer, Time-Lost Sapphire granting notables in radius
8% increased Ignite Magnitude,7% increased Magnitude of Ailments you inflictandDamaging Ailments deal damage 3% faster. After step 4 the Calcs tab listed each of those roughly three times per notable in radius: IgniteMagnitude Effectwent fromx 53.36tox 97.46and the burn rate modifier from1.92to2.52, inflating Ignite DPS from 6,784,381 to 12,391,309 — an 83% increase from allocating a passive that grants none of those stats. Hit damage was untouched throughout, since this particular jewel only grants ailment modifiers; a jewel granting hit stats inflates those the same way.The fix rebuilds the list from the modifiers found in the current pass instead of appending to whatever was left over. It also stops a jewel from keeping functions it no longer grants after a variant change. Only jewels reach this branch, and
BuildModListsForSlotsmakes a singleBuildModListForSlotNumcall for them (the multi-call loop is for weapons and rings), so rebuilding is safe.Steps taken to verify a working solution:
Magnitude Effectand the burn rate modifier stay at their correct values through a completed Power Report followed by tree edits.3% increased Ignite Fasterexactly once, summing to the expected burn rate modifier.src/Classes/Item.luaatmasterand at the v0.23.1 tag: neither reaches the append outsideBuildModList, and the reproduction does not trigger on a release build.Link to a build that showcases this PR:
Any build with a jewel granting "Passive Skills in Radius also grant" modifiers; the trigger is the Power Report, not the build.
Screenshots:
Time-lost used in the example (10 notables selected)
Ignite magnitude before generating power report
Ignite magnitude after generating power report