summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-24 23:22:07 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-24 23:22:07 +0300
commit083278009ab0d94d305754c14c7372b61f410931 (patch)
treee69cb84cdb882e829335bbd472fda031fb8995a6 /src/map/itemdb.c
parent82293aa84c93ba1cbe822387a5cde55b979ffcb6 (diff)
downloadplugin-083278009ab0d94d305754c14c7372b61f410931.tar.gz
plugin-083278009ab0d94d305754c14c7372b61f410931.tar.bz2
plugin-083278009ab0d94d305754c14c7372b61f410931.tar.xz
plugin-083278009ab0d94d305754c14c7372b61f410931.zip
Add into item_db.conf option AllowPickup, by default true.
It allow pickup item from ground.
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 587441c..cccabc5 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -44,7 +44,12 @@ void eitemdb_readdb_additional_fields(int *itemid,
return;
}
+ config_setting_t *t = NULL;
+
if (libconfig->setting_lookup_int(it, "FloorLifeTime", &i32) && i32 >= 0)
data->floorLifeTime = i32;
+ if ((t = libconfig->setting_get_member(it, "AllowPickup")))
+ data->allowPickup = libconfig->setting_get_bool(t) ? 1 : 0;
+
hookStop();
}