PathOfBuildingCommunity / PathOfBuilding

Offline build planner for Path of Exile.
https://pathofbuilding.community
Other
3.63k stars 2k forks source link

Fix Abyss jewels not working in weapon swap #7653

Closed Paliak closed 4 days ago

Paliak commented 6 days ago

Fixes #7644

Description of the problem being solved:

When using weaponSet 2 some items with slotNames containing swap would get clobbered depending on order in build.itemsTab.orderedSlots.

https://github.com/PathOfBuildingCommunity/PathOfBuilding/blob/ad60a7a1a3d50ea88c0ba20394a0c618a3fc58af/src/Modules/CalcSetup.lua#L670-L675

If the correct item was added it had the swap stripped. When the non swap counterpart is iterated over item is set to nil which is later assigned to the map with effectively the same key as the existing element removing it from the table.

Additionally this pr uses goto to skip iterations where item is explicitly set to nil. I can't think of any other cases where this change could affect things other than the issue being solved.

Steps taken to verify a working solution:

Link to a build that showcases this PR:

https://pobb.in/QH3ki1iuOi4L

Before screenshot:

obraz obraz

After screenshot:

obraz

obraz