summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorHaruna <haru@dotalux.com>2014-12-02 12:12:33 +0100
committerHaruna <haru@dotalux.com>2014-12-02 12:12:33 +0100
commitd4e0689858b294260c610e77c27812797bbf26c0 (patch)
tree4cd261b49621a864fcb72723960ca2b24980bab9 /src/map/pc.c
parent274aaebe2bad43a8196e3ff39ede344da8ce4d64 (diff)
parent40a239fcdaa1c6669868f06136b62a95c183e68c (diff)
downloadhercules-d4e0689858b294260c610e77c27812797bbf26c0.tar.gz
hercules-d4e0689858b294260c610e77c27812797bbf26c0.tar.bz2
hercules-d4e0689858b294260c610e77c27812797bbf26c0.tar.xz
hercules-d4e0689858b294260c610e77c27812797bbf26c0.zip
Merge pull request #397 from 4144/nodelonuse
Add item attribute what prevent item removing on use.
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