Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue parsing certain item bases #5452

Merged
merged 1 commit into from
Dec 29, 2022

Conversation

Paliak
Copy link
Contributor

@Paliak Paliak commented Dec 24, 2022

Fixes #5363 .

Description of the problem being solved:

Current best match algorithm only checks the length of the prefix to determine match "quality". This causes issues such as with the item in the mentioned issue. This pr changes the algorithm to use match length instead.

All stock pob items seem to work fine with this change as well as items from random builds i had laying around but it could do with some more testing.

@QuickStick123 QuickStick123 added the bug Something isn't working label Dec 25, 2022
Copy link
Member

@Wires77 Wires77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks similar to the scan function in ModParser.lua, and might benefit from some abstraction to use the same function in both places. Otherwise looks good though.

@Wires77 Wires77 changed the title FIX: best match parsing of item base type Fix issue parsing certain item bases Dec 29, 2022
@Wires77 Wires77 merged commit a26db10 into PathOfBuildingCommunity:dev Dec 29, 2022
@Paliak Paliak deleted the bestMatchParsing branch January 20, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ringmail is parsed as ring, not body armour
3 participants