From 0cb065dca4f0793f601e807069c725cee4b459f1 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 13 May 2019 23:15:59 +0300 Subject: Update from hercules --- src/emap/unit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/emap/unit.c b/src/emap/unit.c index 4797d0d..e3559ba 100644 --- a/src/emap/unit.c +++ b/src/emap/unit.c @@ -64,6 +64,7 @@ int eunit_can_move_pre(struct block_list **blPtr) if (sd && ( sd->state.vending || + sd->state.prevend || sd->state.buyingstore || sd->block_action.move)) { -- cgit v1.2.3-70-g09d2 From 3e8a083fbfc8127b2222f34f6a599c93038fe1d9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 14 May 2019 01:21:40 +0300 Subject: Fix compilation errors after hercules update --- src/elogin/init.c | 7 +------ src/emap/init.c | 1 + src/emap/script_buildins.c | 1 + 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/elogin/init.c b/src/elogin/init.c index 5f17a46..52a95bf 100644 --- a/src/elogin/init.c +++ b/src/elogin/init.c @@ -35,11 +35,6 @@ HPExport struct hplugin_info pinfo = HPM_VERSION }; -#define addHookPrePriv(ifname, type, funcname, hook) ( \ - (void)((HPMHOOK_pre_ ## type ## _ ## funcname)0 == (hook)), \ - HPMi->hooking->AddHook(HOOK_TYPE_PRE, #ifname "->" #funcname, (hook), HPMi->pid) \ - ) - HPExport void plugin_init (void) { interfaces_init_common(); @@ -53,7 +48,7 @@ HPExport void plugin_init (void) addHookPre(login, client_login, elogin_client_login_pre); addHookPre(login, check_password, elogin_check_password_pre); - addHookPrePriv(lclif->p, PRIV__lclif, parse_CA_CONNECT_INFO_CHANGED, elogin_parse_ping_pre); + addHookPrePriv(lclif, parse_CA_CONNECT_INFO_CHANGED, elogin_parse_ping_pre); addHookPost(login, client_login, elogin_client_login_post); } diff --git a/src/emap/init.c b/src/emap/init.c index 3c40f30..dfc1241 100644 --- a/src/emap/init.c +++ b/src/emap/init.c @@ -40,6 +40,7 @@ #include "map/party.h" #include "map/pet.h" #include "map/pc.h" +#include "map/refine.h" #include "map/script.h" #include "map/storage.h" #include "map/trade.h" diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c index 93e9388..5135874 100644 --- a/src/emap/script_buildins.c +++ b/src/emap/script_buildins.c @@ -17,6 +17,7 @@ #include "map/instance.h" #include "map/npc.h" #include "map/pc.h" +#include "map/refine.h" #include "map/script.h" #include "map/quest.h" -- cgit v1.2.3-70-g09d2 From 9f23e082a90ff69817f0ed01d9508a755b3fb1a9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 14 May 2019 03:11:52 +0300 Subject: Add legacy bl name packets for legacy clients --- src/emap/clif.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/emap/clif.h | 4 +++ src/emap/init.c | 5 +++ 3 files changed, 105 insertions(+) diff --git a/src/emap/clif.c b/src/emap/clif.c index 53d9a29..aa82932 100644 --- a/src/emap/clif.c +++ b/src/emap/clif.c @@ -529,6 +529,102 @@ void eclif_charnameupdate_pre(struct map_session_data **ssdPtr) } } +// clientVersion < 26 +void eclif_homname_ack_pre(int *fdPtr, struct block_list **blPtr) +{ + struct block_list *bl = *blPtr; + int fd = *fdPtr; + struct SessionExt *data = session_get(fd); + if (!data) + return; + if (data->clientVersion >= 26) + { + return; + } + + nullpo_retv(bl); + Assert_retv(bl->type == BL_HOM); + + struct packet_reqname_ack packet = { 0 }; + packet.packet_id = reqName; + packet.gid = bl->id; + memcpy(packet.name, BL_UCCAST(BL_HOM, bl)->homunculus.name, NAME_LENGTH); + clif->send_selforarea(fd, bl, &packet, sizeof(struct packet_reqname_ack)); + hookStop(); +} + +// clientVersion < 26 +void eclif_mername_ack_pre(int *fdPtr, struct block_list **blPtr) +{ + struct block_list *bl = *blPtr; + int fd = *fdPtr; + struct SessionExt *data = session_get(fd); + if (!data) + return; + if (data->clientVersion >= 26) + { + return; + } + + nullpo_retv(bl); + Assert_retv(bl->type == BL_MER); + + struct packet_reqname_ack packet = { 0 }; + packet.packet_id = reqName; + packet.gid = bl->id; + memcpy(packet.name, BL_UCCAST(BL_MER, bl)->db->name, NAME_LENGTH); + clif->send_selforarea(fd, bl, &packet, sizeof(struct packet_reqname_ack)); + hookStop(); +} + +// clientVersion < 26 +void eclif_petname_ack_pre(int *fdPtr, struct block_list **blPtr) +{ + struct block_list *bl = *blPtr; + int fd = *fdPtr; + struct SessionExt *data = session_get(fd); + if (!data) + return; + if (data->clientVersion >= 26) + { + return; + } + + nullpo_retv(bl); + Assert_retv(bl->type == BL_PET); + + struct packet_reqname_ack packet = { 0 }; + packet.packet_id = reqName; + packet.gid = bl->id; + memcpy(packet.name, BL_UCCAST(BL_PET, bl)->pet.name, NAME_LENGTH); + clif->send_selforarea(fd, bl, &packet, sizeof(struct packet_reqname_ack)); + hookStop(); +} + +// clientVersion < 26 +void eclif_elemname_ack_pre(int *fdPtr, struct block_list **blPtr) +{ + struct block_list *bl = *blPtr; + int fd = *fdPtr; + struct SessionExt *data = session_get(fd); + if (!data) + return; + if (data->clientVersion >= 26) + { + return; + } + + nullpo_retv(bl); + Assert_retv(bl->type == BL_ELEM); + + struct packet_reqname_ack packet = { 0 }; + packet.packet_id = reqName; + packet.gid = bl->id; + memcpy(packet.name, BL_UCCAST(BL_ELEM, bl)->db->name, NAME_LENGTH); + clif->send_selforarea(fd, bl, &packet, sizeof(struct packet_reqname_ack)); + hookStop(); +} + #define equipPos(index, field) \ equip = sd->equip_index[index]; \ if (equip >= 0) \ diff --git a/src/emap/clif.h b/src/emap/clif.h index 1c602d8..b4f384d 100644 --- a/src/emap/clif.h +++ b/src/emap/clif.h @@ -13,6 +13,10 @@ void eclif_blname_ack_pre(int *fdPtr, struct block_list **blPtr); void eclif_blname_ack_pre_sub(int *fdPtr, struct block_list **blPtr); +void eclif_homname_ack_pre(int *fdPtr, struct block_list **blPtr); +void eclif_mername_ack_pre(int *fdPtr, struct block_list **blPtr); +void eclif_petname_ack_pre(int *fdPtr, struct block_list **blPtr); +void eclif_elemname_ack_pre(int *fdPtr, struct block_list **blPtr); void eclif_charnameupdate_pre(struct map_session_data **ssdPtr); void eclif_getareachar_unit_post(TBL_PC *sd, struct block_list *bl); diff --git a/src/emap/init.c b/src/emap/init.c index dfc1241..0e83b9a 100644 --- a/src/emap/init.c +++ b/src/emap/init.c @@ -290,6 +290,11 @@ HPExport void plugin_init (void) addHookPre(clif, quest_send_list, eclif_quest_send_list_pre); addHookPre(clif, quest_add, eclif_quest_add_pre); addHookPre(clif, blname_ack, eclif_blname_ack_pre); + addHookPre(clif, homname_ack, eclif_homname_ack_pre); + addHookPre(clif, mername_ack, eclif_mername_ack_pre); + addHookPre(clif, petname_ack, eclif_petname_ack_pre); + addHookPre(clif, elemname_ack, eclif_elemname_ack_pre); + addHookPre(clif, charnameupdate, eclif_charnameupdate_pre); addHookPre(clif, getareachar_item, eclif_getareachar_item_pre); addHookPre(clif, dropflooritem, eclif_dropflooritem_pre); -- cgit v1.2.3-70-g09d2 From 4d6327d1f40e86fc0524545700c928e3434cfc0e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 15 May 2019 20:22:31 +0300 Subject: Fix warnings in clang 3.9 --- src/emap/clif.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/emap/clif.c b/src/emap/clif.c index aa82932..9bdb6b8 100644 --- a/src/emap/clif.c +++ b/src/emap/clif.c @@ -545,7 +545,8 @@ void eclif_homname_ack_pre(int *fdPtr, struct block_list **blPtr) nullpo_retv(bl); Assert_retv(bl->type == BL_HOM); - struct packet_reqname_ack packet = { 0 }; + struct packet_reqname_ack packet; + memset(&packet, 0, sizeof(packet)); packet.packet_id = reqName; packet.gid = bl->id; memcpy(packet.name, BL_UCCAST(BL_HOM, bl)->homunculus.name, NAME_LENGTH); @@ -569,7 +570,8 @@ void eclif_mername_ack_pre(int *fdPtr, struct block_list **blPtr) nullpo_retv(bl); Assert_retv(bl->type == BL_MER); - struct packet_reqname_ack packet = { 0 }; + struct packet_reqname_ack packet; + memset(&packet, 0, sizeof(packet)); packet.packet_id = reqName; packet.gid = bl->id; memcpy(packet.name, BL_UCCAST(BL_MER, bl)->db->name, NAME_LENGTH); @@ -593,7 +595,8 @@ void eclif_petname_ack_pre(int *fdPtr, struct block_list **blPtr) nullpo_retv(bl); Assert_retv(bl->type == BL_PET); - struct packet_reqname_ack packet = { 0 }; + struct packet_reqname_ack packet; + memset(&packet, 0, sizeof(packet)); packet.packet_id = reqName; packet.gid = bl->id; memcpy(packet.name, BL_UCCAST(BL_PET, bl)->pet.name, NAME_LENGTH); @@ -617,7 +620,8 @@ void eclif_elemname_ack_pre(int *fdPtr, struct block_list **blPtr) nullpo_retv(bl); Assert_retv(bl->type == BL_ELEM); - struct packet_reqname_ack packet = { 0 }; + struct packet_reqname_ack packet; + memset(&packet, 0, sizeof(packet)); packet.packet_id = reqName; packet.gid = bl->id; memcpy(packet.name, BL_UCCAST(BL_ELEM, bl)->db->name, NAME_LENGTH); -- cgit v1.2.3-70-g09d2 From 5ea15b37b25106a228c5ede264bd5424b1291507 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 26 Jun 2019 21:39:31 +0300 Subject: Update from hercules --- src/emap/script_buildins.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c index 5135874..34d8f54 100644 --- a/src/emap/script_buildins.c +++ b/src/emap/script_buildins.c @@ -1282,7 +1282,8 @@ BUILDIN(failedRemoveCardsIndex) if (sd->status.inventory[i].card[c] && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD) { cardflag = 1; - sd->status.inventory[i].card[c] = 0; + if (typefail == 1) + sd->status.inventory[i].card[c] = 0; if (typefail == 2) { // add cards to inventory, clear @@ -1468,6 +1469,12 @@ BUILDIN(npcWalkTo) if (nd) { unit->bl2ud2(&nd->bl); // ensure nd->ud is safe to edit + if (nd->ud == NULL) + { + ShowWarning("buildin_npcwalkto: floating NPC don't have unit data.\n"); + return false; + } + if (!nd->status.hp) { status_calc_npc(nd, SCO_FIRST); @@ -1477,7 +1484,7 @@ BUILDIN(npcWalkTo) status_calc_npc(nd, SCO_NONE); } nd->vd.dead_sit = 0; - script_pushint(st, unit->walktoxy(&nd->bl,x,y,0)); + script_pushint(st, unit->walktoxy(&nd->bl, x, y, 0)); return true; } else -- cgit v1.2.3-70-g09d2 From 4e33254976fefcd4b16ccedeaace444e3e1f2926 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 19 Aug 2019 19:29:58 +0300 Subject: Add new compilers and fix issues with old compilers in .gitlab-ci.yml --- .gitlab-ci.yml | 78 +++++++++++++++++++++++++++++++++++++------------ tools/ci/jobs/clang7.sh | 2 +- tools/ci/jobs/clang8.sh | 18 ++++++++++++ tools/ci/jobs/gcc8.sh | 18 ++++++++++++ tools/ci/jobs/gcc9.sh | 18 ++++++++++++ 5 files changed, 115 insertions(+), 19 deletions(-) create mode 100755 tools/ci/jobs/clang8.sh create mode 100755 tools/ci/jobs/gcc8.sh create mode 100755 tools/ci/jobs/gcc9.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4002c7e..df84e57 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,7 +18,7 @@ gcc-snapshot: stage: build script: - ./tools/ci/jobs/gccsnapshot.sh --enable-werror - image: vicamo/debian:sid-i386 + image: i386/debian:unstable gcc-4.8: stage: build @@ -32,18 +32,6 @@ gcc-4.9: - ./tools/ci/jobs/gcc49.sh --enable-werror image: debian:jessie -.gcc-5: - stage: build - script: - - ./tools/ci/jobs/gcc5.sh --enable-werror - image: debian:unstable - -.gcc-5-i386: - stage: build - script: - - ./tools/ci/jobs/gcc5.sh --enable-werror - image: vicamo/debian:sid-i386 - gcc-6: stage: build script: @@ -66,19 +54,31 @@ gcc-7: stage: build script: - ./tools/ci/jobs/gcc7.sh --enable-werror - image: vicamo/debian:sid-i386 + image: i386/debian:unstable + +gcc-8: + stage: build + script: + - ./tools/ci/jobs/gcc8.sh --enable-werror + image: debian:unstable + +gcc-9: + stage: build + script: + - ./tools/ci/jobs/gcc9.sh --enable-werror + image: debian:unstable clang-3.9: stage: build script: - ./tools/ci/jobs/clang39.sh --enable-werror - image: debian:stable + image: debian:stretch .clang-3.9-i386: stage: build script: - ./tools/ci/jobs/clang39.sh --enable-werror - image: vicamo/debian:sid-i386 + image: i386/debian:unstable clang-6: stage: build @@ -90,7 +90,7 @@ clang-6: stage: build script: - ./tools/ci/jobs/clang6.sh --enable-werror - image: vicamo/debian:sid-i386 + image: i386/debian:unstable clang-7: stage: build @@ -102,7 +102,13 @@ clang-7: stage: build script: - ./tools/ci/jobs/clang7.sh --enable-werror - image: vicamo/debian:sid-i386 + image: i386/debian:unstable + +clang-8: + stage: build + script: + - ./tools/ci/jobs/clang8.sh --enable-werror + image: debian:unstable # tests @@ -149,6 +155,18 @@ gcc-7-sanitize: - ./tools/ci/jobs/gcc7.sh --enable-werror --enable-sanitize image: debian:unstable +gcc-8-sanitize: + stage: test + script: + - ./tools/ci/jobs/gcc8.sh --enable-werror --enable-sanitize + image: debian:unstable + +gcc-9-sanitize: + stage: test + script: + - ./tools/ci/jobs/gcc9.sh --enable-werror --enable-sanitize + image: debian:unstable + gcc-4.9_lto-sanitize: stage: test script: @@ -173,6 +191,18 @@ gcc-7_lto-sanitize: - ./tools/ci/jobs/gcc7.sh --enable-werror --enable-lto --enable-sanitize image: debian:unstable +gcc-8_lto-sanitize: + stage: test + script: + - ./tools/ci/jobs/gcc8.sh --enable-werror --enable-lto --enable-sanitize + image: debian:unstable + +gcc-9_lto-sanitize: + stage: test + script: + - ./tools/ci/jobs/gcc9.sh --enable-werror --enable-lto --enable-sanitize + image: debian:unstable + gcc-4.8-lto: stage: test script: @@ -203,6 +233,18 @@ gcc-7_lto: - ./tools/ci/jobs/gcc7.sh --enable-werror --enable-lto image: debian:unstable +gcc-8_lto: + stage: test + script: + - ./tools/ci/jobs/gcc8.sh --enable-werror --enable-lto + image: debian:unstable + +gcc-9_lto: + stage: test + script: + - ./tools/ci/jobs/gcc9.sh --enable-werror --enable-lto + image: debian:unstable + # disabled due not support -std=c11 .gcc-4.6: stage: test diff --git a/tools/ci/jobs/clang7.sh b/tools/ci/jobs/clang7.sh index c416f8d..18f4a9b 100755 --- a/tools/ci/jobs/clang7.sh +++ b/tools/ci/jobs/clang7.sh @@ -2,7 +2,7 @@ export CC=clang-7 export CXX=clang++-7 -export LOGFILE=clang6.log +export LOGFILE=clang7.log source ./tools/ci/scripts/init.sh diff --git a/tools/ci/jobs/clang8.sh b/tools/ci/jobs/clang8.sh new file mode 100755 index 0000000..3c10b3d --- /dev/null +++ b/tools/ci/jobs/clang8.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +export CC=clang-8 +export CXX=clang++-8 +export LOGFILE=clang8.log + +source ./tools/ci/scripts/init.sh + +aptget_install clang-8 \ + git-core \ + make autoconf automake autopoint \ + libtool libmysqlclient-dev libz-dev libpcre3-dev + +do_init +build_init + +run_configure $* +run_make diff --git a/tools/ci/jobs/gcc8.sh b/tools/ci/jobs/gcc8.sh new file mode 100755 index 0000000..6f1fb66 --- /dev/null +++ b/tools/ci/jobs/gcc8.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +export CC=gcc-8 +export CXX=g++-8 +export LOGFILE=gcc8.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-8 \ + git-core \ + make autoconf automake autopoint \ + libtool libmysqlclient-dev libz-dev libpcre3-dev + +do_init +build_init + +run_configure $* +run_make diff --git a/tools/ci/jobs/gcc9.sh b/tools/ci/jobs/gcc9.sh new file mode 100755 index 0000000..01e7ec6 --- /dev/null +++ b/tools/ci/jobs/gcc9.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +export CC=gcc-9 +export CXX=g++-9 +export LOGFILE=gcc9.log + +source ./tools/ci/scripts/init.sh + +aptget_install gcc-9 \ + git-core \ + make autoconf automake autopoint \ + libtool libmysqlclient-dev libz-dev libpcre3-dev + +do_init +build_init + +run_configure $* +run_make -- cgit v1.2.3-70-g09d2 From 917fd1fb3a28e70d0713eb63d1f431989b5c16f6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 19 Aug 2019 19:45:04 +0300 Subject: Enable some i386 ci builds --- .gitlab-ci.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index df84e57..7f6c40d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,7 @@ gcc-snapshot: - ./tools/ci/jobs/gccsnapshot.sh --enable-werror image: debian:unstable -.gcc-snapshot-i386: +gcc-snapshot-i386: stage: build script: - ./tools/ci/jobs/gccsnapshot.sh --enable-werror @@ -38,7 +38,7 @@ gcc-6: - ./tools/ci/jobs/gcc6.sh --enable-werror image: debian:stretch -.gcc-6-i386: +gcc-6-i386: stage: build script: - ./tools/ci/jobs/gcc6.sh --enable-werror @@ -50,7 +50,7 @@ gcc-7: - ./tools/ci/jobs/gcc7.sh --enable-werror image: debian:unstable -.gcc-7-i386: +gcc-7-i386: stage: build script: - ./tools/ci/jobs/gcc7.sh --enable-werror @@ -62,12 +62,24 @@ gcc-8: - ./tools/ci/jobs/gcc8.sh --enable-werror image: debian:unstable +gcc-8-i386: + stage: build + script: + - ./tools/ci/jobs/gcc8.sh --enable-werror + image: i386/debian:unstable + gcc-9: stage: build script: - ./tools/ci/jobs/gcc9.sh --enable-werror image: debian:unstable +gcc-9-i386: + stage: build + script: + - ./tools/ci/jobs/gcc9.sh --enable-werror + image: i386/debian:unstable + clang-3.9: stage: build script: @@ -110,6 +122,12 @@ clang-8: - ./tools/ci/jobs/clang8.sh --enable-werror image: debian:unstable +clang-8-i386: + stage: build + script: + - ./tools/ci/jobs/clang8.sh --enable-werror + image: i386/debian:unstable + # tests gcc-snapshot_lto-sanitize: -- cgit v1.2.3-70-g09d2 From b54941d94ae8fb2a88bf5287d5c65630e2e018cf Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 19 Aug 2019 22:13:13 +0300 Subject: Drop support for protocol version 21 --- src/elogin/parse.c | 4 ++-- src/emap/send.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/elogin/parse.c b/src/elogin/parse.c index fffd532..6514165 100644 --- a/src/elogin/parse.c +++ b/src/elogin/parse.c @@ -35,7 +35,7 @@ void login_parse_version(int fd) clientVersion = RFIFOL(fd, 2); // check for minimal supported version - if (clientVersion < 21) + if (clientVersion < 22) { lclif->login_error(fd, 5); return; @@ -60,7 +60,7 @@ bool elogin_client_login_pre(int *fdPtr, safestrncpy(username, RFIFOP(fd, 6), NAME_LENGTH); int len = (int)safestrnlen(username, NAME_LENGTH); // check for minimal supported version - if (clientVersion < 21) + if (clientVersion < 22) { lclif->login_error(fd, 5); hookStop(); diff --git a/src/emap/send.c b/src/emap/send.c index 82ba452..08c57b0 100644 --- a/src/emap/send.c +++ b/src/emap/send.c @@ -178,8 +178,6 @@ void send_pc_own_flags(struct block_list* bl) struct SessionExt *data = session_get_bysd(sd); if (!data) return; - if (data->clientVersion < 22) - return; const int fd = sd->fd; WFIFOHEAD(fd, 8); -- cgit v1.2.3-70-g09d2 From d3569abf6d6ebeb057533dcd40ec49985b05603d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 19 Aug 2019 22:14:51 +0300 Subject: Drop support for protocol version 22 --- src/elogin/parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/elogin/parse.c b/src/elogin/parse.c index 6514165..9156cb4 100644 --- a/src/elogin/parse.c +++ b/src/elogin/parse.c @@ -35,7 +35,7 @@ void login_parse_version(int fd) clientVersion = RFIFOL(fd, 2); // check for minimal supported version - if (clientVersion < 22) + if (clientVersion < 23) { lclif->login_error(fd, 5); return; @@ -60,7 +60,7 @@ bool elogin_client_login_pre(int *fdPtr, safestrncpy(username, RFIFOP(fd, 6), NAME_LENGTH); int len = (int)safestrnlen(username, NAME_LENGTH); // check for minimal supported version - if (clientVersion < 22) + if (clientVersion < 23) { lclif->login_error(fd, 5); hookStop(); -- cgit v1.2.3-70-g09d2 From 0f9a449b36408845280f0fdbe9cf4dc2084a7f8c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 20 Aug 2019 01:16:59 +0300 Subject: Change packet version to 20170517 and evol packet offset to 0x100 --- src/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index d17cc8a..8c9a8d5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -138,8 +138,8 @@ MAP_SRC = emap/atcommand.c \ SHARED_CFLAGS = ${CFLAGS} -O3 -pipe -ffast-math -std=c11 -Wall -Wextra -Wno-sign-compare -Wno-unused -fno-omit-frame-pointer \ -DPCRE_SUPPORT -I../../.. -I../../../../3rdparty \ - -DPACKETVER=20150513 \ - -DevolPacketOffset=0 + -DPACKETVER=20170517 \ + -DevolPacketOffset=0x100 SHARED_LDFLAGS = -lm -avoid-version -Wl,--no-undefined if ENABLE_STATIC_BUILD -- cgit v1.2.3-70-g09d2 From 4d08f967636f9aae862e6d3016a6d5faf0817542 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 3 Sep 2019 22:19:56 +0300 Subject: Disable req attributes checks in items on connect. --- src/emap/pc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/emap/pc.c b/src/emap/pc.c index ec45cdc..011743e 100644 --- a/src/emap/pc.c +++ b/src/emap/pc.c @@ -293,6 +293,11 @@ int epc_isequip_post(int retVal, if (!data) return retVal; + // test for missing basic stats calculation + if (sd->regen.sregen == NULL) + { + return retVal; + } if (sd->battle_status.str < data->requiredStr || sd->battle_status.agi < data->requiredAgi || sd->battle_status.vit < data->requiredVit || -- cgit v1.2.3-70-g09d2