From 212949b352ccfcc271bf5ec9403107b04ef7c254 Mon Sep 17 00:00:00 2001 From: Haru Date: Sat, 20 Dec 2014 20:27:15 +0100 Subject: Removed deprecated commands setriding, checkriding Follow-up to c6f102e Signed-off-by: Haru --- doc/script_commands.txt | 25 ------------------------- src/map/script.c | 45 --------------------------------------------- 2 files changed, 70 deletions(-) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 3c99afcf1..2165d8a8f 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -3904,31 +3904,6 @@ regardless of color. --------------------------------------- -*setriding {}; -*checkriding() - - @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - @ /!\ This command is deprecated @ - @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - -This command is deprecated and it should not be used in new scripts, as it -is scheduled to be removed on or after November 30th, 2014. Please consider -using setmount and checkmount() instead. - -If is 0 this command will remove the mount from the character. -Otherwise it gives the invoking character a PecoPeco (if they are a Knight -series class), a GrandPeco (if they are a Crusader series class), or -a Gryphon (if they are a Royal Guard). Unlike 'setfalcon' and 'setcart' -this will not work at all if they aren't of a class which can ride. -Note: the character needs to have the skill KN_RIDING to gain a mount. - -The accompanying function will return 1 if the invoking character is -riding a bird and 0 if they aren't. - - if (checkriding()) mes "PLEASE leave your bird outside! No riding birds on the floor here!"; - ---------------------------------------- - *setdragon {}; *checkdragon() diff --git a/src/map/script.c b/src/map/script.c index be73fe5b2..2f82a7f13 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -8623,49 +8623,6 @@ BUILDIN(setfalcon) return true; } -/// Returns if the player is riding. -/// -/// checkriding() -> -/// -/// @author Valaris -BUILDIN(checkriding) -{ - TBL_PC* sd; - - sd = script->rid2sd(st); - if (sd == NULL) - return true; // no player attached, report source - - if (pc_hasmount(sd)) - script_pushint(st, 1); - else - script_pushint(st, 0); - - return true; -} - -/// Sets if the player is riding. -/// defaults to 1 -/// -/// setriding ; -/// setriding; -BUILDIN(setriding) -{ - int flag = 1; - TBL_PC* sd; - - sd = script->rid2sd(st); - - if (sd == NULL) - return true;// no player attached, report source - - if (script_hasdata(st,2)) - flag = script_getnum(st,2); - pc->setridingpeco(sd, flag ? true : false); - - return true; -} - enum setmount_type { SETMOUNT_TYPE_AUTODETECT = -1, SETMOUNT_TYPE_NONE = 0, @@ -19378,8 +19335,6 @@ void script_parse_builtin(void) { BUILDIN_DEF(checkcart,""), BUILDIN_DEF(setfalcon,"?"), BUILDIN_DEF(checkfalcon,""), - BUILDIN_DEF_DEPRECATED(setriding,"?"), // Deprecated 2014-10-30 [Haru] - BUILDIN_DEF_DEPRECATED(checkriding,""), // Deprecated 2014-10-30 [Haru] BUILDIN_DEF(setmount,"?"), BUILDIN_DEF(checkmount,""), BUILDIN_DEF(checkwug,""), -- cgit v1.2.3-70-g09d2