summaryrefslogtreecommitdiff
path: root/src/map/data/itemd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/data/itemd.c')
-rw-r--r--src/map/data/itemd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map/data/itemd.c b/src/map/data/itemd.c
index a862617..7b7bda7 100644
--- a/src/map/data/itemd.c
+++ b/src/map/data/itemd.c
@@ -16,6 +16,15 @@
#include "map/data/itemd.h"
#include "map/struct/itemdext.h"
+struct ItemdExt *itemd_get_by_item(struct item *item)
+{
+ if (!item)
+ return NULL;
+ const int nameid = item->nameid;
+ struct item_data *item_data = itemdb->exists(nameid);
+ return itemd_get(item_data);
+}
+
struct ItemdExt *itemd_get(struct item_data *item)
{
if (!item)