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 Items::getItemIdByName #3588

Merged
merged 2 commits into from
Sep 17, 2021
Merged

Conversation

yamaken93
Copy link
Member

Pull Request Prelude

Changes Proposed

Prevent empty names from being added to nameToItems and prevent Items::getItemByName return a valid item id when the name is empty.
Make sure the Items::getItemIdByName behavior is exact: for each item id there will be only one name and the name will be the first found in items.xml.
Changed NameMap from unordered_multimap to unordered_map since multiple keys is useless now and probably before.

…::getItemByName return a valid item id when the name is empty

make sure the Items::getItemIdByName behavior is exact: for each item id there will be only one name and the name will be the first found in items.xml
changed NameMap from unordered_multimap to unordered_map since multiple keys is useless now and probably before
EPuncker
EPuncker previously approved these changes Aug 21, 2021
src/items.cpp Outdated Show resolved Hide resolved
src/items.cpp Outdated Show resolved Hide resolved
@DSpeichert DSpeichert merged commit 16fd37d into otland:master Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants