Skip to content

Keep corrupted gem requirements at base level#1915

Open
unrealdreamz wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
unrealdreamz:fix/corrupted-gem-requirements
Open

Keep corrupted gem requirements at base level#1915
unrealdreamz wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
unrealdreamz:fix/corrupted-gem-requirements

Conversation

@unrealdreamz
Copy link
Copy Markdown
Contributor

Summary

Fixes #1738.

Keeps imported level-corrupted gems using their effective corrupted level for skill calculations, while using the uncorrupted gem level for level/attribute requirements.

Root Cause

Character import folded Levels from Corruption directly into gemInstance.level. SkillsTabClass:ProcessSocketGroup() then used that same effective level to compute reqLevel, reqStr, reqDex, and reqInt, so a +1/-1 corrupted gem incorrectly changed its requirements.

Fix

  • Import now preserves the gem's natural requirement level separately as requirementGemLevel when a level corruption is present.
  • Requirement calculation uses requirementGemLevel when present, falling back to the effective gem level for normal gems.
  • The separate requirement level is saved/loaded with the build so imported characters stay correct after reopening.
  • Manual gem level/gem selection/default-level changes clear the import-only override to avoid stale requirement data.
  • Gem tooltips use the same requirement-level helper as the skills tab.
  • Added a regression covering both +level and -level corruption semantics.

Validation

Local, non-GUI validation only:

gh pr list --repo PathOfBuildingCommunity/PathOfBuilding-PoE2 --state open -S "1738 corrupted skill gem requirements import" -> []
git diff --check -> passed
git diff --cached --check -> passed
git show --check --stat --oneline HEAD -> passed
where.exe lua -> not found
where.exe luajit -> not found
where.exe busted -> not found

I did not run Busted locally because this Windows checkout does not have Lua/LuaJIT/Busted on PATH. I also avoided Docker/GUI validation so no visible command windows or heavy processes were launched.

Risk / Rollback

Moderate-low risk. Normal gems continue to use their effective gem level for requirements. Only imported/saved gems with requirementGemLevel take the alternate path, and manual edits clear it. Rollback is this commit.

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.

Character import corrupted skill/spirit gem requirements discrepancy

1 participant