From 3b74b7b3d1dc121c2fb0a197d1130bd5daae8762 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sat, 28 Oct 2023 15:27:44 -0300 Subject: [PATCH] add missing zero packetver for AUTOSPELL_LIST2 packet --- src/map/clif.c | 4 ++-- src/map/packets_struct.h | 2 +- src/map/skill.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index 1e189c1f0b7..c0bcaf1c986 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8026,7 +8026,7 @@ static void clif_autospell(struct map_session_data *sd, uint16 skill_lv, int *sk #if PACKETVER_MAIN_NUM >= 20090406 || defined(PACKETVER_RE) || defined(PACKETVER_ZERO) || PACKETVER_SAK_NUM >= 20080618 nullpo_retv(sd); -#if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031 +#if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20180523 const int len = sizeof(struct PACKET_ZC_AUTOSPELLLIST) + sizeof(int) * list_len; #else const int len = sizeof(struct PACKET_ZC_AUTOSPELLLIST); @@ -8043,7 +8043,7 @@ static void clif_autospell(struct map_session_data *sd, uint16 skill_lv, int *sk memset(p, 0, sizeof(struct PACKET_ZC_AUTOSPELLLIST)); p->packetType = HEADER_ZC_AUTOSPELLLIST; -#if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031 +#if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20180523 p->packetLength = len; #endif memcpy(p->skills, skill_ids_list, sizeof(int) * list_len); diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 698401d6da7..60761d42bb8 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -3722,7 +3722,7 @@ struct PACKET_CZ_VIEW_CAMERAINFO { DEFINE_PACKET_HEADER(CZ_VIEW_CAMERAINFO, 0x0a77); #endif -#if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031 +#if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20180523 // PACKET_ZC_AUTOSPELLLIST2 struct PACKET_ZC_AUTOSPELLLIST { int16 packetType; diff --git a/src/map/skill.c b/src/map/skill.c index 8642fe9e269..ca9466300c5 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -25123,7 +25123,7 @@ static bool skill_read_autospell_db(const char *filename) count++; } -#if PACKETVER_MAIN_NUM < 20181128 && PACKETVER_RE_NUM < 20181031 +#if PACKETVER_MAIN_NUM < 20181128 && PACKETVER_RE_NUM < 20181031 && PACKETVER_ZERO_NUM < 20180523 if (count > 7) { ShowWarning("%s: Your current packet version only supports up to 7 autospell skills, but your autospell db contains \"%d\" skills. Some skills may not be shown.\n", __func__, count); ShowWarning("%s: Update your packet version or reduce the number of skills to fix this warning.\n", __func__);