From 884225977fed41c3ad24cbc0b446480de6fc3cd3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 25 Apr 2019 22:16:29 +0300 Subject: Add script function for close roulette window New script function: closeroulette() --- src/map/script.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/map/script.c') diff --git a/src/map/script.c b/src/map/script.c index 80489dfac..4fb24708b 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -25275,6 +25275,16 @@ static BUILDIN(getInventorySize) return true; } +// force close roulette window if it opened +static BUILDIN(closeroulette) +{ + struct map_session_data *sd = script_rid2sd(st); + if (sd == NULL) + return false; + clif->roulette_close(sd); + return true; +} + /** * Adds a built-in script function. * @@ -26026,6 +26036,8 @@ static void script_parse_builtin(void) BUILDIN_DEF(expandInventoryResult, "i"), BUILDIN_DEF(expandInventory, "i"), BUILDIN_DEF(getInventorySize, ""), + + BUILDIN_DEF(closeroulette, ""), }; int i, len = ARRAYLENGTH(BUILDIN); RECREATE(script->buildin, char *, script->buildin_count + len); // Pre-alloc to speed up -- cgit v1.2.3-60-g2f50