summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-04-11 04:43:42 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-04-11 04:43:42 +0000
commit895fd7fd301368cbf21a13cf9a25be37d0256db3 (patch)
tree5629e9b8ccb209ac21173a5305c7587005cf4dea /src/map/pc.c
parenta23bc93b64df690d1b8ccef524e300ec712948dd (diff)
downloadhercules-895fd7fd301368cbf21a13cf9a25be37d0256db3.tar.gz
hercules-895fd7fd301368cbf21a13cf9a25be37d0256db3.tar.bz2
hercules-895fd7fd301368cbf21a13cf9a25be37d0256db3.tar.xz
hercules-895fd7fd301368cbf21a13cf9a25be37d0256db3.zip
Fixed bugreport:5543 this item is official rentable and it should unmount upon expire.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15845 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 5f74574d6..c761f82c5 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -456,13 +456,14 @@ void pc_inventory_rentals(struct map_session_data *sd)
if( sd->status.inventory[i].expire_time == 0 )
continue;
- if( sd->status.inventory[i].expire_time <= time(NULL) )
- {
+ if( sd->status.inventory[i].expire_time <= time(NULL) ) {
+ if( sd->status.inventory[i].nameid == ITEMID_REINS_OF_MOUNT
+ && sd->sc.option&OPTION_MOUNTING ) {
+ pc_setoption(sd, sd->sc.option&~OPTION_MOUNTING);
+ }
clif_rental_expired(sd->fd, i, sd->status.inventory[i].nameid);
pc_delitem(sd, i, sd->status.inventory[i].amount, 1, 0, LOG_TYPE_OTHER);
- }
- else
- {
+ } else {
expire_tick = (unsigned int)(sd->status.inventory[i].expire_time - time(NULL)) * 1000;
clif_rental_time(sd->fd, sd->status.inventory[i].nameid, (int)(expire_tick / 1000));
next_tick = min(expire_tick, next_tick);