summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2013-06-16 23:48:14 -0700
committermalufett <malufett.eat.my.binaries@gmail.com>2013-06-16 23:48:14 -0700
commit23167727ed5e798f12e2b9140b405b83003186e7 (patch)
treeb7ce2c7b39f663fecc0575f81ec07ca22356b452 /src
parentf33c54e76be4f3fea6a21aab40fe13feb952239d (diff)
downloadhercules-23167727ed5e798f12e2b9140b405b83003186e7.tar.gz
hercules-23167727ed5e798f12e2b9140b405b83003186e7.tar.bz2
hercules-23167727ed5e798f12e2b9140b405b83003186e7.tar.xz
hercules-23167727ed5e798f12e2b9140b405b83003186e7.zip
Fixed Bug#7381 & #7379
-Reins_of_Mount should now ignore delay(when fail) and sitting condition.
Diffstat (limited to 'src')
-rw-r--r--src/map/pc.c7
-rw-r--r--src/map/script.c5
2 files changed, 7 insertions, 5 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index ef70aad97..635f48db5 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4295,8 +4295,8 @@ int pc_useitem(struct map_session_data *sd,int n)
return 0;
/* 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 ) {
- if( nameid != ITEMID_REINS_OF_MOUNT && sd->sc.data[SC_ALL_RIDING] )
+ if( sd->inventory_data[n]->flag.delay_consume && nameid != ITEMID_REINS_OF_MOUNT ) {
+ if( sd->sc.data[SC_ALL_RIDING] )
return 0;
else if( pc_issit(sd) )
return 0;
@@ -4323,7 +4323,8 @@ int pc_useitem(struct map_session_data *sd,int n)
} else {// not yet used item (all slots are initially empty)
sd->item_delay[i].nameid = nameid;
}
- sd->item_delay[i].tick = tick + sd->inventory_data[n]->delay;
+ if( !(nameid == ITEMID_REINS_OF_MOUNT && sd->sc.option&(OPTION_WUGRIDER|OPTION_RIDING|OPTION_DRAGON|OPTION_MADOGEAR)) )
+ sd->item_delay[i].tick = tick + sd->inventory_data[n]->delay;
} else {// should not happen
ShowError("pc_useitem: Exceeded item delay array capacity! (nameid=%d, char_id=%d)\n", nameid, sd->status.char_id);
}
diff --git a/src/map/script.c b/src/map/script.c
index 15870aaa7..823febbc6 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -16520,9 +16520,10 @@ BUILDIN(setmounting) {
TBL_PC* sd;
if( (sd = script_rid2sd(st)) == NULL )
return true;
- if( sd->sc.option&(OPTION_WUGRIDER|OPTION_RIDING|OPTION_DRAGON|OPTION_MADOGEAR) )
+ if( sd->sc.option&(OPTION_WUGRIDER|OPTION_RIDING|OPTION_DRAGON|OPTION_MADOGEAR) ){
+ clif->msgtable(sd->fd, 0X78b);
script_pushint(st,0);//can't mount with one of these
- else {
+ }else {
if( sd->sc.data[SC_ALL_RIDING] )
status_change_end(&sd->bl, SC_ALL_RIDING, INVALID_TIMER);
else