summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorIbrahim Zidan <brahem@aotsw.com>2019-04-17 07:29:18 +0200
committerIbrahim Zidan <brahem@aotsw.com>2019-05-05 23:40:39 +0200
commit8fa081b6b4ad26851f3ab8f485ba76f3e4338762 (patch)
treec45282c318a70a4da40762ce220406abd1f21ed7 /src/map/script.c
parent5a0c9f2f74070e9d1e6f4fec503b3687b5f1ef88 (diff)
downloadhercules-8fa081b6b4ad26851f3ab8f485ba76f3e4338762.tar.gz
hercules-8fa081b6b4ad26851f3ab8f485ba76f3e4338762.tar.bz2
hercules-8fa081b6b4ad26851f3ab8f485ba76f3e4338762.tar.xz
hercules-8fa081b6b4ad26851f3ab8f485ba76f3e4338762.zip
Implement Refinery UI
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 1cc1d3ad2..5843ac292 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -25286,6 +25286,25 @@ static BUILDIN(closeroulette)
return true;
}
+static BUILDIN(openrefineryui)
+{
+ struct map_session_data *sd = script_rid2sd(st);
+
+ if (sd == NULL) {
+ script_pushint(st, 0);
+ return true;
+ }
+
+ if (battle_config.enable_refinery_ui == 0) {
+ script_pushint(st, 0);
+ return true;
+ }
+
+ clif->OpenRefineryUI(sd);
+ script_pushint(st, 1);
+ return true;
+}
+
/**
* Adds a built-in script function.
*
@@ -26039,6 +26058,7 @@ static void script_parse_builtin(void)
BUILDIN_DEF(getInventorySize, ""),
BUILDIN_DEF(closeroulette, ""),
+ BUILDIN_DEF(openrefineryui, ""),
};
int i, len = ARRAYLENGTH(BUILDIN);
RECREATE(script->buildin, char *, script->buildin_count + len); // Pre-alloc to speed up