summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-01-21 13:42:17 +0100
committerHaru <haru@dotalux.com>2015-01-23 03:53:38 +0100
commitb1b1b1aa8edc866a83029081e93d3e7d0f138189 (patch)
tree84e3fbd414daf0c5c92a0394d2710e54c5c85146
parent5e4e0603799f170dcf985a57933110cd6ba3017a (diff)
downloadhercules-b1b1b1aa8edc866a83029081e93d3e7d0f138189.tar.gz
hercules-b1b1b1aa8edc866a83029081e93d3e7d0f138189.tar.bz2
hercules-b1b1b1aa8edc866a83029081e93d3e7d0f138189.tar.xz
hercules-b1b1b1aa8edc866a83029081e93d3e7d0f138189.zip
Deprecated command isday().
- The command is deprecated and it will be removed in about a month. Please use isnight() in your custom scripts instead. Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r--doc/script_commands.txt20
-rw-r--r--src/map/script.c2
2 files changed, 13 insertions, 9 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 028c12791..420f31943 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -3967,16 +3967,20 @@ if War of Emperium is on and 0 if it isn't.
---------------------------------------
*isnight()
-*isday()
-These functions will return 1 or 0 depending on whether the server is in
-night mode or day mode. 'isnight' returns 1 if it's night and 0 if it
-isn't, 'isday' the other way around. They can be used interchangeably,
-pick the one you like more:
+This functions will return true or false depending on whether the server is in
+night mode or day mode:
+
+ if (!isnight()) mes "I only prowl in the night.";
+
+*isday()
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ @ /!\ This command is deprecated @
+ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- // These two are equivalent:
- if (isday()) mes "I only prowl in the night.";
- if (isnight()!=1) mes "I only prowl in the night.";
+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 consider using !isnight()
+instead.
---------------------------------------
diff --git a/src/map/script.c b/src/map/script.c
index fc43aa94a..a2ea86ac6 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -19384,7 +19384,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(logmes,"s"), //this command actls as MES but rints info into LOG file either SQL/TXT [Lupus]
BUILDIN_DEF(summon,"si??"), // summons a slave monster [Celest]
BUILDIN_DEF(isnight,""), // check whether it is night time [Celest]
- BUILDIN_DEF(isday,""), // check whether it is day time [Celest]
+ BUILDIN_DEF_DEPRECATED(isday,""), // check whether it is day time [Celest] // DEPRECATED 2015-01-21 [Haru]
BUILDIN_DEF(isequipped,"i*"), // check whether another item/card has been equipped [Celest]
BUILDIN_DEF(isequippedcnt,"i*"), // check how many items/cards are being equipped [Celest]
BUILDIN_DEF(cardscnt,"i*"), // check how many items/cards are being equipped in the same arm [Lupus]