diff options
author | Ibrahim Zidan <brahem@aotsw.com> | 2019-05-07 06:57:09 +0200 |
---|---|---|
committer | Ibrahim Zidan <brahem@aotsw.com> | 2019-09-22 23:45:39 +0200 |
commit | 3d595e664563bf6ac3e434152baadd7dbc295d06 (patch) | |
tree | 259a55d6f74ad2e93331041729215ec7c80d8cd3 /src/map | |
parent | 5d7c8d9857f096abfc4f205c8771b0b4c91fab2c (diff) | |
download | hercules-3d595e664563bf6ac3e434152baadd7dbc295d06.tar.gz hercules-3d595e664563bf6ac3e434152baadd7dbc295d06.tar.bz2 hercules-3d595e664563bf6ac3e434152baadd7dbc295d06.tar.xz hercules-3d595e664563bf6ac3e434152baadd7dbc295d06.zip |
Implement getfont script command which returns player's current chat font
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/script.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c index 8658b7ab5..64b794ba0 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -22744,6 +22744,19 @@ static BUILDIN(setfont) return true; } +static BUILDIN(getfont) +{ + struct map_session_data *sd = script->rid2sd(st); + + if (sd == NULL) { + script_pushint(st, 0); + return true; + } + + script_pushint(st, sd->status.font); + return true; +} + static int buildin_mobuseskill_sub(struct block_list *bl, va_list ap) { struct mob_data *md = NULL; @@ -26356,6 +26369,7 @@ static void script_parse_builtin(void) BUILDIN_DEF(mercenary_set_faith,"ii"), BUILDIN_DEF(readbook,"ii"), BUILDIN_DEF(setfont,"i"), + BUILDIN_DEF(getfont, ""), BUILDIN_DEF(areamobuseskill,"siiiiviiiii"), BUILDIN_DEF(progressbar,"si"), BUILDIN_DEF(progressbar_unit,"si?"), |