summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorIbrahim Zidan <brahem@aotsw.com>2019-05-07 06:57:09 +0200
committerIbrahim Zidan <brahem@aotsw.com>2019-09-22 23:45:39 +0200
commit3d595e664563bf6ac3e434152baadd7dbc295d06 (patch)
tree259a55d6f74ad2e93331041729215ec7c80d8cd3 /src/map
parent5d7c8d9857f096abfc4f205c8771b0b4c91fab2c (diff)
downloadhercules-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.c14
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?"),