diff options
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | doc/script_commands.txt | 5 | ||||
-rw-r--r-- | src/map/script.c | 3 |
3 files changed, 8 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 39755fcd4..d84907edb 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/03/30
+ * Added year day return in gettime function. gettime(8) returns 1~366
+ [Foruken]
* the auth function in login.c won't jstrescapecpy passwords that were
encrypted. Thanks to foobar. (but are still more cases to check for? Dunno,
the code is kinda long...) [Skotlex]
diff --git a/doc/script_commands.txt b/doc/script_commands.txt index acf532b48..dffb448ba 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -2731,8 +2731,9 @@ This function will return specified information about the current system time. 3 - Hour (of a day)
4 - Week day (0 for Sunday, 6 is Saturday)
5 - Day of the month.
-6 - Number of the month
-7 - Year
+6 - Number of the month.
+7 - Year.
+8 - Day of the year.
It will only return numbers.
diff --git a/src/map/script.c b/src/map/script.c index 5a9b08b91..acf09a796 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5275,6 +5275,9 @@ int buildin_gettime(struct script_state *st) /* Asgard Version */ case 7://Year(20xx)
push_val(st->stack,C_INT,t->tm_year+1900);
break;
+ case 8://Year Day(01~366)
+ push_val(st->stack,C_INT,t->tm_yday+1);
+ break;
default://(format error)
push_val(st->stack,C_INT,-1);
break;
|