summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-18 01:51:32 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-02 13:27:39 +0300
commit40a239fcdaa1c6669868f06136b62a95c183e68c (patch)
tree4cd261b49621a864fcb72723960ca2b24980bab9 /src/map/pc.c
parent274aaebe2bad43a8196e3ff39ede344da8ce4d64 (diff)
downloadhercules-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/pc.c')
-rw-r--r--src/map/pc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 6ba06c82b..9af5ee5ff 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4519,7 +4519,7 @@ int pc_useitem(struct map_session_data *sd,int n) {
if( sd->inventory_data[n]->flag.delay_consume )
clif->useitemack(sd,n,amount,true);
else {
- if( sd->status.inventory[n].expire_time == 0 ) {
+ if (sd->status.inventory[n].expire_time == 0 && !(sd->inventory_data[n]->flag.keepafteruse)) {
clif->useitemack(sd,n,amount-1,true);
pc->delitem(sd,n,1,1,0,LOG_TYPE_CONSUME); // Rental Usable Items are not deleted until expiration
} else