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] Removing unnecessary warn on item creation when id equal 0 #368

Merged
merged 1 commit into from
May 4, 2022

Conversation

marcosvf132
Copy link
Contributor

@marcosvf132 marcosvf132 commented May 1, 2022

Description

Add a check on the spdlog::warn to prevent when itemID is equal 0. This happens a lot when slain a creature that has no body registered. (Regular creatures/summons/boss)
image

Note

You may notice that there is already a check if the itemtype ID is equal 0 or not. But this is not necessary the same check because when we try to create an item that is not registered on the item protobuf binary file and on items.xml, then the itemtype will return with id == 0 but type != 0.

@sonarcloud
Copy link

sonarcloud bot commented May 1, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@marcosvf132 marcosvf132 merged commit 48ab545 into opentibiabr:main May 4, 2022
@marcosvf132 marcosvf132 deleted the fix-item-id-0-log branch May 4, 2022 19:22
luan pushed a commit that referenced this pull request Jul 11, 2023
Add a check on the spdlog::warn to prevent when itemID is equal 0. This happens a lot when slain a creature that has no body registered. (Regular creatures/summons/boss)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants