summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-08-26 15:36:43 -0400
committergumi <git@gumi.ca>2018-08-26 16:08:06 -0400
commitc5ecaaaeb56408289904fdfc67dbbf9c1a5e94bd (patch)
tree2a9c51d8328a7a30540cc69feeb57b8c207a837d /src
parenta7bee2cdb8b4d4a2a250d611be4babd27043b6db (diff)
downloadhercules-c5ecaaaeb56408289904fdfc67dbbf9c1a5e94bd.tar.gz
hercules-c5ecaaaeb56408289904fdfc67dbbf9c1a5e94bd.tar.bz2
hercules-c5ecaaaeb56408289904fdfc67dbbf9c1a5e94bd.tar.xz
hercules-c5ecaaaeb56408289904fdfc67dbbf9c1a5e94bd.zip
make it legal to not pass arguments to buildin_mes
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c
index e6c4ef1d1..36dd686b3 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -5965,10 +5965,14 @@ static bool script_sprintf_helper(struct script_state *st, int start, struct Str
static BUILDIN(mes)
{
struct map_session_data *sd = script->rid2sd(st);
+
if (sd == NULL)
return true;
- clif->scriptmes(sd, st->oid, script_getstr(st, 2));
+ if (script_hasdata(st, 2))
+ clif->scriptmes(sd, st->oid, script_getstr(st, 2));
+ else
+ clif->scriptmes(sd, st->oid, "");
return true;
}
@@ -24951,8 +24955,8 @@ static void script_parse_builtin(void)
BUILDIN_DEF(__setr,"rv?"),
// NPC interaction
- BUILDIN_DEF(mes,"s"),
- BUILDIN_DEF(mesf,"s*"),
+ BUILDIN_DEF(mes, "?"),
+ BUILDIN_DEF(mesf, "s*"),
BUILDIN_DEF(next,""),
BUILDIN_DEF(close,""),
BUILDIN_DEF(close2,""),