summaryrefslogtreecommitdiff
path: root/src/map/data
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-18 14:13:09 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-18 14:13:09 +0300
commit0846b3e83759b42d8d5abea155605d7bcc0c2e22 (patch)
tree1e791a8b2a0b7a9dc2b503474c4f041a2076c777 /src/map/data
parentda93a53f7630a62f342f51743d63914f3ea5f266 (diff)
downloadevol-hercules-0846b3e83759b42d8d5abea155605d7bcc0c2e22.tar.gz
evol-hercules-0846b3e83759b42d8d5abea155605d7bcc0c2e22.tar.bz2
evol-hercules-0846b3e83759b42d8d5abea155605d7bcc0c2e22.tar.xz
evol-hercules-0846b3e83759b42d8d5abea155605d7bcc0c2e22.zip
Impliment FloorLifeTime in item_db.conf
Diffstat (limited to 'src/map/data')
-rw-r--r--src/map/data/itemd.c9
-rw-r--r--src/map/data/itemd.h1
2 files changed, 10 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)
diff --git a/src/map/data/itemd.h b/src/map/data/itemd.h
index 611d6cd..d3c529b 100644
--- a/src/map/data/itemd.h
+++ b/src/map/data/itemd.h
@@ -6,6 +6,7 @@
struct ItemdExt;
+struct ItemdExt *itemd_get_by_item(struct item *item);
struct ItemdExt *itemd_get(struct item_data *item);
struct ItemdExt *itemd_create(void);