diff options
author | Andrei Karas <akaras@inbox.ru> | 2019-04-25 22:16:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2019-05-05 22:24:25 +0300 |
commit | 884225977fed41c3ad24cbc0b446480de6fc3cd3 (patch) | |
tree | ee5f2ed56904da88e56594c4abe109d67f6af51c /src/map/script.c | |
parent | 3cde52381fe5ea8643e6b78393384df0cae696e1 (diff) | |
download | hercules-884225977fed41c3ad24cbc0b446480de6fc3cd3.tar.gz hercules-884225977fed41c3ad24cbc0b446480de6fc3cd3.tar.bz2 hercules-884225977fed41c3ad24cbc0b446480de6fc3cd3.tar.xz hercules-884225977fed41c3ad24cbc0b446480de6fc3cd3.zip |
Add script function for close roulette window
New script function: closeroulette()
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 12 |
1 files changed, 12 insertions, 0 deletions
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 |