summaryrefslogtreecommitdiff
path: root/src/emap/script_buildins.c
diff options
context:
space:
mode:
authorgumi <mekolat@users.noreply.github.com>2017-08-23 14:50:33 -0400
committergumi <mekolat@users.noreply.github.com>2017-08-23 15:15:44 -0400
commit4a65ddf6c61d72a52d18c9c18e1b405c49c591e9 (patch)
tree1be4e826661148ebb85c3052aeeed62d0ad96528 /src/emap/script_buildins.c
parentdee2b1a29dc3af07bb434ab986aa552e8be5e26c (diff)
downloadevol-hercules-closedialog.tar.gz
evol-hercules-closedialog.tar.bz2
evol-hercules-closedialog.tar.xz
evol-hercules-closedialog.zip
remove buildin_closedialog, partly add it to buildin_closeclientdialog for backward-compatibilityclosedialog
Diffstat (limited to 'src/emap/script_buildins.c')
-rw-r--r--src/emap/script_buildins.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c
index 4c32a9a..d888b22 100644
--- a/src/emap/script_buildins.c
+++ b/src/emap/script_buildins.c
@@ -179,17 +179,19 @@ BUILDIN(npcTalk3)
return true;
}
-BUILDIN(closeDialog)
-{
- getSD();
- send_npccommand(sd, st->oid, 5);
- return true;
-}
-
BUILDIN(closeClientDialog)
{
getSD();
- send_npccommand(sd, st->oid, 14);
+ struct SessionExt *data = session_get_bysd(sd);
+
+ if (data->clientVersion < 19)
+ {
+ send_npccommand(sd, st->oid, 5);
+ }
+ else
+ {
+ send_npccommand(sd, st->oid, 14);
+ }
return true;
}