summaryrefslogtreecommitdiff
path: root/src/map/itemdb.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-06-06 12:08:00 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2025-04-02 09:27:39 +0000
commitf598d61d0dc4ada0aa7800363664c9968b8659a9 (patch)
tree99ae4d519cfc2ca2af0a9fa3d8e9be79a5c4d4be /src/map/itemdb.cpp
parent88dfbd91ed22ab4ad98b2b9f0243f9d9faa9b49d (diff)
downloadtmwa-itemdb-code-cleanups.tar.gz
tmwa-itemdb-code-cleanups.tar.bz2
tmwa-itemdb-code-cleanups.tar.xz
tmwa-itemdb-code-cleanups.zip
Some small itemdb cleanupitemdb-code-cleanups
Mostly removing unused functions and made pc_isUseitem slightly more efficient.
Diffstat (limited to 'src/map/itemdb.cpp')
-rw-r--r--src/map/itemdb.cpp21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/map/itemdb.cpp b/src/map/itemdb.cpp
index fa675d2..fcde178 100644
--- a/src/map/itemdb.cpp
+++ b/src/map/itemdb.cpp
@@ -116,14 +116,9 @@ Borrowed<struct item_data> itemdb_search(ItemNameId nameid)
*
*------------------------------------------
*/
-int itemdb_isequip(ItemNameId nameid)
+bool itemdb_isequip(ItemNameId nameid)
{
- ItemType type = itemdb_type(nameid);
- return !(type == ItemType::USE
- || type == ItemType::_2
- || type == ItemType::JUNK
- || type == ItemType::_6
- || type == ItemType::ARROW);
+ return itemdb_isequip2(itemdb_search(nameid));
}
/*==========================================
@@ -140,18 +135,6 @@ bool itemdb_isequip2(Borrowed<struct item_data> data)
|| type == ItemType::ARROW);
}
-/*==========================================
- *
- *------------------------------------------
- */
-int itemdb_isequip3(ItemNameId nameid)
-{
- ItemType type = itemdb_type(nameid);
- return (type == ItemType::WEAPON
- || type == ItemType::ARMOR
- || type == ItemType::_8);
-}
-
bool itemdb_readdb(ZString filename)
{
io::LineCharReader in(filename);