summaryrefslogtreecommitdiff
path: root/src/emap
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-09-04 20:06:25 +0300
committerAndrei Karas <akaras@inbox.ru>2016-09-04 20:06:25 +0300
commitf8f24eccf6562af825f298851710848c2212cf61 (patch)
treed6eca429a2859119040056ec6205e16c4e235842 /src/emap
parentdf17c1e4f0a317a20515429be0c32ee79af8c14b (diff)
downloadevol-hercules-f8f24eccf6562af825f298851710848c2212cf61.tar.gz
evol-hercules-f8f24eccf6562af825f298851710848c2212cf61.tar.bz2
evol-hercules-f8f24eccf6562af825f298851710848c2212cf61.tar.xz
evol-hercules-f8f24eccf6562af825f298851710848c2212cf61.zip
Add script command for close npc dialog only on client without affecting server side.
New script command: closeclientdialog
Diffstat (limited to 'src/emap')
-rw-r--r--src/emap/init.c1
-rw-r--r--src/emap/script_buildins.c7
-rw-r--r--src/emap/script_buildins.h1
3 files changed, 9 insertions, 0 deletions
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);