diff options
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 212c11687..e7a2fdb14 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -24816,6 +24816,16 @@ static BUILDIN(changecamera) return true; } +// update preview window to given item +static BUILDIN(itempreview) +{ + struct map_session_data *sd = script_rid2sd(st); + if (sd == NULL) + return false; + clif->item_preview(sd, script_getnum(st, 2)); + return true; +} + /** * Adds a built-in script function. * @@ -25550,6 +25560,8 @@ static void script_parse_builtin(void) // camera BUILDIN_DEF(camerainfo, ""), BUILDIN_DEF(changecamera, "iii?"), + + BUILDIN_DEF(itempreview, "i"), }; int i, len = ARRAYLENGTH(BUILDIN); RECREATE(script->buildin, char *, script->buildin_count + len); // Pre-alloc to speed up |