Skip to content

Iterate flasks and charms in slot order - #2512

Merged
LocalIdentity merged 2 commits into
PathOfBuildingCommunity:devfrom
rasmuskl:ninja/stable-flask-charm-order
Sep 10, 2026
Merged

Iterate flasks and charms in slot order#2512
LocalIdentity merged 2 commits into
PathOfBuildingCommunity:devfrom
rasmuskl:ninja/stable-flask-charm-order

Conversation

@rasmuskl

@rasmuskl rasmuskl commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

env.flasks and env.charms are keyed by item table, so pairs() walks them in memory-address order, which differs between processes. That order reaches the modDB and, for charms, the limit loop stops early, so it also decided which charms applied. CalcSetup now records each slotted item's slot number in env.itemSlotIndex, and mergeFlasks/mergeCharms iterate in that order with item.id as the tiebreak.

Steps taken to verify a working solution:

Has been running headless in poe.ninja for about a month.

rasmuskl and others added 2 commits September 9, 2026 13:14
env.flasks and env.charms are keyed by item table, so pairs() walks them in memory-address order, which differs between processes. That order reaches the modDB and, for charms, the limit loop stops early, so it also decided which charms applied. CalcSetup now records each slotted item's slot number in env.itemSlotIndex, and mergeFlasks/mergeCharms iterate in that order with item.id as the tiebreak.
@LocalIdentity LocalIdentity added the technical Hidden from release notes label Sep 10, 2026
@LocalIdentity
LocalIdentity merged commit 3aff315 into PathOfBuildingCommunity:dev Sep 10, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

technical Hidden from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants