summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-28 04:39:54 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-28 04:39:54 +0000
commitbaabe7950fb4957e8d6fdc9159058eb2fef4c198 (patch)
treee4c7780744d16ea974fdd5468536acf3d851926f /src/map/pc.c
parent0fcebf1d6be27d213aecbf3af841db25779e9057 (diff)
downloadhercules-baabe7950fb4957e8d6fdc9159058eb2fef4c198.tar.gz
hercules-baabe7950fb4957e8d6fdc9159058eb2fef4c198.tar.bz2
hercules-baabe7950fb4957e8d6fdc9159058eb2fef4c198.tar.xz
hercules-baabe7950fb4957e8d6fdc9159058eb2fef4c198.zip
Fixed bugreport:5497, LK/RG/PD/RG new mounts are now available again to clients prior to november 2011, items with delayed consumption are no longer available to users in new mount state. Updated setoption to consider pc_cant_mount and remove OPTION_MOUNTING from the opt bundle
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15808 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 0e6fb2f0e..14d12ca5a 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4007,6 +4007,10 @@ int pc_useitem(struct map_session_data *sd,int n)
// Store information for later use before it is lost (via pc_delitem) [Paradox924X]
nameid = sd->inventory_data[n]->nameid;
+ /* Items with delayed consume are not meant to work while in mounts except reins of mount(12622) */
+ if( sd->inventory_data[n]->flag.delay_consume && nameid != 12622 && sd->sc.option&OPTION_MOUNTING )
+ return 0;
+
//Since most delay-consume items involve using a "skill-type" target cursor,
//perform a skill-use check before going through. [Skotlex]
//resurrection was picked as testing skill, as a non-offensive, generic skill, it will do.
@@ -4058,14 +4062,11 @@ int pc_useitem(struct map_session_data *sd,int n)
//Check if the item is to be consumed immediately [Skotlex]
if( sd->inventory_data[n]->flag.delay_consume )
clif_useitemack(sd,n,amount,true);
- else
- {
- if( sd->status.inventory[n].expire_time == 0 )
- {
+ else {
+ if( sd->status.inventory[n].expire_time == 0 ) {
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
+ } else
clif_useitemack(sd,n,0,false);
}
if(sd->status.inventory[n].card[0]==CARD0_CREATE &&