diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-18 01:51:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-02 13:27:39 +0300 |
commit | 40a239fcdaa1c6669868f06136b62a95c183e68c (patch) | |
tree | 4cd261b49621a864fcb72723960ca2b24980bab9 /src/map/itemdb.c | |
parent | 274aaebe2bad43a8196e3ff39ede344da8ce4d64 (diff) | |
download | hercules-40a239fcdaa1c6669868f06136b62a95c183e68c.tar.gz hercules-40a239fcdaa1c6669868f06136b62a95c183e68c.tar.bz2 hercules-40a239fcdaa1c6669868f06136b62a95c183e68c.tar.xz hercules-40a239fcdaa1c6669868f06136b62a95c183e68c.zip |
Add item attribute what prevent item removing on use.
New item attribute: KeepAfterUse
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r-- | src/map/itemdb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 67aab7a18..508a0ccec 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -1787,9 +1787,12 @@ int itemdb_readdb_libconfig_sub(config_setting_t *it, int n, const char *source) if ( (t = libconfig->setting_get_member(it, "BuyingStore")) ) id.flag.buyingstore = libconfig->setting_get_bool(t) ? 1 : 0; + if ((t = libconfig->setting_get_member(it, "KeepAfterUse"))) + id.flag.keepafteruse = libconfig->setting_get_bool(t) ? 1 : 0; + if (libconfig->setting_lookup_int(it, "Delay", &i32) && i32 >= 0) id.delay = i32; - + if ( (t = libconfig->setting_get_member(it, "Trade")) ) { if (config_setting_is_group(t)) { config_setting_t *tt = NULL; |