From 4a5a1205ac1c570724574b1aed3d3902f1bdbc27 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 20 Apr 2017 01:28:58 +0300 Subject: Drop support for client protocol version 10 (Aug 16 2015). --- src/elogin/parse.c | 4 ++-- src/emap/clif.c | 27 +++------------------------ src/emap/script_buildins.c | 8 ++------ 3 files changed, 7 insertions(+), 32 deletions(-) (limited to 'src') diff --git a/src/elogin/parse.c b/src/elogin/parse.c index d7135c8..0467134 100644 --- a/src/elogin/parse.c +++ b/src/elogin/parse.c @@ -34,7 +34,7 @@ void login_parse_version(int fd) clientVersion = RFIFOL(fd, 2); - if (clientVersion < 10) + if (clientVersion < 11) { lclif->login_error(fd, 5); return; @@ -58,7 +58,7 @@ bool elogin_client_login_pre(int *fdPtr, char username[NAME_LENGTH]; safestrncpy(username, RFIFOP(fd, 6), NAME_LENGTH); int len = (int)safestrnlen(username, NAME_LENGTH); - if (clientVersion < 10) + if (clientVersion < 11) { lclif->login_error(fd, 5); hookStop(); diff --git a/src/emap/clif.c b/src/emap/clif.c index fefd4ea..36a3dc7 100644 --- a/src/emap/clif.c +++ b/src/emap/clif.c @@ -551,35 +551,14 @@ int eclif_send_actual_pre(int *fd, if (*len >= 2) { const int packet = RBUFW (buf, 0); - if (packet == 0x1d7) + if (packet == 0x1d7 || + packet == 0x84b) { // not sending old packets to new clients // probably useless hookStop(); return 0; } - if (packet == 0x84b) - { - struct SessionExt *data = session_get(*fd); - if (!data) - return 0; - if (data->clientVersion >= 10) - { // not sending old packets to new clients - hookStop(); - return 0; - } - } - if (packet == 0xb19) - { - struct SessionExt *data = session_get(*fd); - if (!data) - return 0; - if (data->clientVersion < 10) - { // not sending new packets to old clients - hookStop(); - return 0; - } - } if (packet == 0x2dd) { struct SessionExt *data = session_get(*fd); @@ -1318,7 +1297,7 @@ void eclif_getareachar_item_pre(struct map_session_data **sdPtr, int fd = sd->fd; struct SessionExt *data = session_get(fd); - if (!data || data->clientVersion < 10) + if (!data) return; WFIFOHEAD(fd, 28); diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c index 3775814..6acdde0 100644 --- a/src/emap/script_buildins.c +++ b/src/emap/script_buildins.c @@ -409,10 +409,8 @@ BUILDIN(requestItemIndex) st->state = RERUNLINE; // send item request - if (client && client->clientVersion >= 11) + if (client) send_npccommand(sd, st->oid, 11); - else - clif->scriptinputstr(sd, st->oid); } else { @@ -462,10 +460,8 @@ BUILDIN(requestItemsIndex) st->state = RERUNLINE; // send item request with limit count - if (client && client->clientVersion >= 11) + if (client) send_npccommand2(sd, st->oid, 11, count, 0, 0); - else - clif->scriptinputstr(sd, st->oid); } else { -- cgit v1.2.3-70-g09d2