From e42d9cb57a747427aee8d5edc15059de52588386 Mon Sep 17 00:00:00 2001 From: AnnieRuru Date: Mon, 11 Mar 2019 18:17:18 +0800 Subject: Deprecate *petstat script command --- db/constants.conf | 27 +++++++++++++++++++++------ doc/script_commands.txt | 7 +++++++ src/map/script.c | 2 +- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index 2e379cb14..66e0ef066 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -1483,12 +1483,27 @@ constants_db: { e_panic: 79 e_whisp: 80 - comment__: "petstat" - PET_CLASS: 1 - PET_NAME: 2 - PET_LEVEL: 3 - PET_HUNGRY: 4 - PET_INTIMATE: 5 + comment__: "petstat - deprecated, use *getpetinfo" + PET_CLASS: { + Value: 1 + Deprecated: true + } + PET_NAME: { + Value: 2 + Deprecated: true + } + PET_LEVEL: { + Value: 3 + Deprecated: true + } + PET_HUNGRY: { + Value: 4 + Deprecated: true + } + PET_INTIMATE: { + Value: 5 + Deprecated: true + } comment__: "getmonsterinfo" MOB_NAME: 0 diff --git a/doc/script_commands.txt b/doc/script_commands.txt index 19f189f81..845570efd 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -3853,6 +3853,10 @@ If the invoking player doesn't own a pet, this command will return *petstat() + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + @ /!\ This command is deprecated @ + @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + Returns current pet status, all are integers except name. Returns 0 or "" if the player doesn't have pets. @@ -3866,6 +3870,9 @@ PET_INTIMATE Example: .@i = petstat(PET_CLASS); +This command is deprecated and it should not be used in new scripts, as it is +likely to be removed at a later time. Please use 'getpetinfo' instead. + --------------------------------------- *getmonsterinfo(, ) diff --git a/src/map/script.c b/src/map/script.c index bba559df8..d6c7fde73 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -25598,7 +25598,7 @@ static void script_parse_builtin(void) BUILDIN_DEF(getd,"s"), BUILDIN_DEF(setd,"sv"), // <--- [zBuffer] List of dynamic var commands - BUILDIN_DEF(petstat,"i"), + BUILDIN_DEF_DEPRECATED(petstat, "i"), // Deprecated 2019-03-11 BUILDIN_DEF(callshop,"s?"), // [Skotlex] BUILDIN_DEF(npcshopitem,"sii*"), // [Lance] BUILDIN_DEF(npcshopadditem,"sii*"), -- cgit v1.2.3-60-g2f50