From f8f24eccf6562af825f298851710848c2212cf61 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 4 Sep 2016 20:06:25 +0300 Subject: Add script command for close npc dialog only on client without affecting server side. New script command: closeclientdialog --- src/emap/init.c | 1 + src/emap/script_buildins.c | 7 +++++++ src/emap/script_buildins.h | 1 + 3 files changed, 9 insertions(+) diff --git a/src/emap/init.c b/src/emap/init.c index 6098f04..2f54a75 100644 --- a/src/emap/init.c +++ b/src/emap/init.c @@ -108,6 +108,7 @@ HPExport void plugin_init (void) addScriptCommand("restorecam", "", restoreCam); addScriptCommand("npctalk3", "s", npcTalk3); addScriptCommand("closedialog", "", closeDialog); + addScriptCommand("closeclientdialog", "", closeClientDialog); addScriptCommand("shop", "s", shop); addScriptCommand("getitemlink", "v*", getItemLink); addScriptCommand("getinvindexlink", "i", getInvIndexLink); diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c index b0cf499..75c3308 100644 --- a/src/emap/script_buildins.c +++ b/src/emap/script_buildins.c @@ -186,6 +186,13 @@ BUILDIN(closeDialog) return true; } +BUILDIN(closeClientDialog) +{ + getSD(); + send_npccommand(sd, st->oid, 14); + return true; +} + BUILDIN(shop) { getSD(); diff --git a/src/emap/script_buildins.h b/src/emap/script_buildins.h index da39ab5..51956bf 100644 --- a/src/emap/script_buildins.h +++ b/src/emap/script_buildins.h @@ -12,6 +12,7 @@ BUILDIN(moveCam); BUILDIN(restoreCam); BUILDIN(npcTalk3); BUILDIN(closeDialog); +BUILDIN(closeClientDialog); BUILDIN(shop); BUILDIN(getItemLink); BUILDIN(requestLang); -- cgit v1.2.3-70-g09d2