From 03526a23e1d6fdb372d37d8ecb93c8ee69ca88f0 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 | 4 ++-- src/map/skill.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index 4960ff325e3..60b2cba8747 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8024,7 +8024,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); @@ -8041,7 +8041,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 7b43e821e1e..04fe9c5edca 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -3708,7 +3708,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; @@ -4768,7 +4768,7 @@ struct PACKET_ZC_NOTIFY_SKILL { int8 action; } __attribute__((packed)); DEFINE_PACKET_HEADER(ZC_NOTIFY_SKILL, 0x01de); -#endif +#endif #if PACKETVER_MAIN_NUM >= 20130731 || PACKETVER_RE_NUM >= 20130724 || defined(PACKETVER_ZERO) struct PACKET_ZC_USE_SKILL { diff --git a/src/map/skill.c b/src/map/skill.c index 782fcc30456..2f2e05ef5f4 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -25097,7 +25097,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__);