From 40a239fcdaa1c6669868f06136b62a95c183e68c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 18 Nov 2014 01:51:32 +0300 Subject: Add item attribute what prevent item removing on use. New item attribute: KeepAfterUse --- src/map/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/pc.c') 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 -- cgit v1.2.3-70-g09d2