summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorpanikon <panikon@zoho.com>2014-07-09 07:56:38 -0300
committerpanikon <panikon@zoho.com>2014-07-09 07:56:38 -0300
commitec51176326c6028630835538db67826281d34ffe (patch)
tree684b3693638c048a14441c786b37cdb0bdcc2588 /src/map/atcommand.c
parent660d7ebdfa98ec4c0379143d00d14443823d41fc (diff)
downloadhercules-ec51176326c6028630835538db67826281d34ffe.tar.gz
hercules-ec51176326c6028630835538db67826281d34ffe.tar.bz2
hercules-ec51176326c6028630835538db67826281d34ffe.tar.xz
hercules-ec51176326c6028630835538db67826281d34ffe.zip
Fixed issue with [AT]mount, it wasn't displaying the expected messages, all errors would simply display "You can not mount a Peco Peco with your current job.", now it's displaying a different message for each possible error
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c42
1 files changed, 27 insertions, 15 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 8f4eb5219..9162d1c45 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -3917,7 +3917,12 @@ ACMD(mount_peco)
return false;
}
- if( (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT && pc->checkskill(sd,RK_DRAGONTRAINING) > 0 ) {
+ if( (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT ) {
+ if( !pc->checkskill(sd,RK_DRAGONTRAINING) ) {
+ sprintf(atcmd_output, msg_txt(213), skill->get_desc(RK_DRAGONTRAINING)); // You need %s to mount!
+ clif->message(fd, atcmd_output);
+ return false;
+ }
if( !(sd->sc.option&OPTION_DRAGON1) ) {
clif->message(sd->fd,msg_txt(1119)); // You have mounted your Dragon.
pc->setoption(sd, sd->sc.option|OPTION_DRAGON1);
@@ -3927,7 +3932,12 @@ ACMD(mount_peco)
}
return true;
}
- if( (sd->class_&MAPID_THIRDMASK) == MAPID_RANGER && pc->checkskill(sd,RA_WUGRIDER) > 0 ) {
+ if( (sd->class_&MAPID_THIRDMASK) == MAPID_RANGER ) {
+ if( !pc->checkskill(sd,RA_WUGRIDER) > 0 ) {
+ sprintf(atcmd_output, msg_txt(213), skill->get_desc(RA_WUGRIDER)); // You need %s to mount!
+ clif->message(fd, atcmd_output);
+ return false;
+ }
if( !pc_isridingwug(sd) ) {
clif->message(sd->fd,msg_txt(1121)); // You have mounted your Warg.
pc->setoption(sd, sd->sc.option|OPTION_WUGRIDER);
@@ -3947,21 +3957,23 @@ ACMD(mount_peco)
}
return true;
}
- if (!pc_isriding(sd)) { // if actually no peco
-
- if (!pc->checkskill(sd, KN_RIDING)) {
- clif->message(fd, msg_txt(213)); // You can not mount a Peco Peco with your current job.
- return false;
+ if( sd->class_&MAPID_SWORDMAN && sd->class_&JOBL_2 ) {
+ if( !pc_isriding(sd) ) { // if actually no peco
+ if (!pc->checkskill(sd, KN_RIDING)) {
+ sprintf(atcmd_output, msg_txt(213), skill->get_desc(KN_RIDING)); // You need %s to mount!
+ clif->message(fd, atcmd_output);
+ return false;
+ }
+ pc->setoption(sd, sd->sc.option | OPTION_RIDING);
+ clif->message(fd, msg_txt(102)); // You have mounted a Peco Peco.
+ } else {//Dismount
+ pc->setoption(sd, sd->sc.option & ~OPTION_RIDING);
+ clif->message(fd, msg_txt(214)); // You have released your Peco Peco.
}
-
- pc->setoption(sd, sd->sc.option | OPTION_RIDING);
- clif->message(fd, msg_txt(102)); // You have mounted a Peco Peco.
- } else {//Dismount
- pc->setoption(sd, sd->sc.option & ~OPTION_RIDING);
- clif->message(fd, msg_txt(214)); // You have released your Peco Peco.
+ return true;
}
-
- return true;
+ clif->message(fd, msg_txt(215)); // Your class can't mount!
+ return false;
}
/*==========================================