diff options
-rw-r--r-- | src/emap/init.c | 1 | ||||
-rw-r--r-- | src/emap/script_buildins.c | 18 | ||||
-rw-r--r-- | src/emap/script_buildins.h | 1 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/emap/init.c b/src/emap/init.c index 8cd7cd4..5621fb9 100644 --- a/src/emap/init.c +++ b/src/emap/init.c @@ -108,7 +108,6 @@ HPExport void plugin_init (void) addScriptCommand("movecam", "ii", moveCam); addScriptCommand("restorecam", "", restoreCam); addScriptCommand("npctalk3", "s", npcTalk3); - addScriptCommand("closedialog", "", closeDialog); addScriptCommand("closeclientdialog", "", closeClientDialog); addScriptCommand("shop", "s", shop); addScriptCommand("getitemlink", "v*", getItemLink); 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; } diff --git a/src/emap/script_buildins.h b/src/emap/script_buildins.h index 91b02b3..81357b9 100644 --- a/src/emap/script_buildins.h +++ b/src/emap/script_buildins.h @@ -11,7 +11,6 @@ BUILDIN(setCam); BUILDIN(moveCam); BUILDIN(restoreCam); BUILDIN(npcTalk3); -BUILDIN(closeDialog); BUILDIN(closeClientDialog); BUILDIN(shop); BUILDIN(getItemLink); |