Skip to content

Commit

Permalink
[Fix] Removing unnecessary warn on item creation when id equal 0 #368
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
marcosvf132 authored May 4, 2022
1 parent a4073d7 commit 48ab545
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/items/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Item* Item::CreateItem(const uint16_t type, uint16_t count /*= 0*/)
}

newItem->incrementReferenceCounter();
} else {
} else if (type != 0) {
SPDLOG_WARN("[Item::CreateItem] Item with id '{}' is not registered and cannot be created.", type);
}

Expand Down

0 comments on commit 48ab545

Please sign in to comment.