diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-22 01:05:39 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-22 01:05:39 +0000 |
commit | 8a6272097a75d0fa77a4878d0970382ac6d86bf7 (patch) | |
tree | 174567a8c002c981abba9355b169ffd74a9c77f5 /src/map/atcommand.c | |
parent | 5471705b4190f390029d990cda966f95db5d19a7 (diff) | |
download | hercules-8a6272097a75d0fa77a4878d0970382ac6d86bf7.tar.gz hercules-8a6272097a75d0fa77a4878d0970382ac6d86bf7.tar.bz2 hercules-8a6272097a75d0fa77a4878d0970382ac6d86bf7.tar.xz hercules-8a6272097a75d0fa77a4878d0970382ac6d86bf7.zip |
Fixed bug in @mount allowing you to mount dragon/mado while in disguise (BADABOOM CRASH).
Adjusted @mount for dragons to require your class to be a rune knight (so @allskill gms mount their correct job)
Added Wug riding support for @mount
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15744 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 81db5731c..7de68236c 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -4128,7 +4128,13 @@ ACMD_FUNC(mapinfo) ACMD_FUNC(mount_peco) { nullpo_retr(-1, sd); - if( pc_checkskill(sd,RK_DRAGONTRAINING) > 0 ) { + + if (sd->disguise) { + clif_displaymessage(fd, msg_txt(212)); // Cannot mount while in disguise. + return -1; + } + + if( (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT && pc_checkskill(sd,RK_DRAGONTRAINING) > 0 ) { if( !(sd->sc.option&OPTION_DRAGON1) ) { clif_displaymessage(sd->fd,"You have mounted your Dragon"); pc_setoption(sd, sd->sc.option|OPTION_DRAGON1); @@ -4138,6 +4144,16 @@ ACMD_FUNC(mount_peco) } return 0; } + if( (sd->class_&MAPID_THIRDMASK) == MAPID_RANGER && pc_checkskill(sd,RA_WUGRIDER) > 0 ) { + if( !pc_isridingwug(sd) ) { + clif_displaymessage(sd->fd,"You have mounted your Wug"); + pc_setoption(sd, sd->sc.option|OPTION_WUGRIDER); + } else { + clif_displaymessage(sd->fd,"You have released your Wug"); + pc_setoption(sd, sd->sc.option&~OPTION_WUGRIDER); + } + return 0; + } if( (sd->class_&MAPID_THIRDMASK) == MAPID_MECHANIC ) { if( !(sd->sc.option&OPTION_MADOGEAR) ) { clif_displaymessage(sd->fd,"You have mounted your Mado Gear"); @@ -4149,21 +4165,15 @@ ACMD_FUNC(mount_peco) return 0; } if (!pc_isriding(sd)) { // if actually no peco - if (!pc_checkskill(sd, KN_RIDING)) - { - clif_displaymessage(fd, msg_txt(213)); // You can not mount a Peco Peco with your current job. - return -1; - } - if (sd->disguise) - { - clif_displaymessage(fd, msg_txt(212)); // Cannot mount a Peco Peco while in disguise. + if (!pc_checkskill(sd, KN_RIDING)) { + clif_displaymessage(fd, msg_txt(213)); // You can not mount a Peco Peco with your current job. return -1; } pc_setoption(sd, sd->sc.option | OPTION_RIDING); clif_displaymessage(fd, msg_txt(102)); // You have mounted a Peco Peco. - } else { //Dismount + } else {//Dismount pc_setoption(sd, sd->sc.option & ~OPTION_RIDING); clif_displaymessage(fd, msg_txt(214)); // You have released your Peco Peco. } |