Skip to content

Commit 4fb81ed

Browse files
committed
add zero packetversion for ZC_AUTOSPELL_LIST2
1 parent 2ef226e commit 4fb81ed

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/map/clif.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8023,7 +8023,7 @@ static void clif_autospell(struct map_session_data *sd, uint16 skill_lv, int *sk
80238023
#if PACKETVER_MAIN_NUM >= 20090406 || defined(PACKETVER_RE) || defined(PACKETVER_ZERO) || PACKETVER_SAK_NUM >= 20080618
80248024
nullpo_retv(sd);
80258025

8026-
#if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031
8026+
#if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20180523
80278027
const int len = sizeof(struct PACKET_ZC_AUTOSPELLLIST) + sizeof(int) * list_len;
80288028
#else
80298029
const int len = sizeof(struct PACKET_ZC_AUTOSPELLLIST);
@@ -8040,7 +8040,7 @@ static void clif_autospell(struct map_session_data *sd, uint16 skill_lv, int *sk
80408040
memset(p, 0, sizeof(struct PACKET_ZC_AUTOSPELLLIST));
80418041

80428042
p->packetType = HEADER_ZC_AUTOSPELLLIST;
8043-
#if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031
8043+
#if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20180523
80448044
p->packetLength = len;
80458045
#endif
80468046
memcpy(p->skills, skill_ids_list, sizeof(int) * list_len);

src/map/packets_struct.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3708,7 +3708,7 @@ struct PACKET_CZ_VIEW_CAMERAINFO {
37083708
DEFINE_PACKET_HEADER(CZ_VIEW_CAMERAINFO, 0x0a77);
37093709
#endif
37103710

3711-
#if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031
3711+
#if PACKETVER_MAIN_NUM >= 20181128 || PACKETVER_RE_NUM >= 20181031 || PACKETVER_ZERO_NUM >= 20180523
37123712
// PACKET_ZC_AUTOSPELLLIST2
37133713
struct PACKET_ZC_AUTOSPELLLIST {
37143714
int16 packetType;
@@ -4768,7 +4768,7 @@ struct PACKET_ZC_NOTIFY_SKILL {
47684768
int8 action;
47694769
} __attribute__((packed));
47704770
DEFINE_PACKET_HEADER(ZC_NOTIFY_SKILL, 0x01de);
4771-
#endif
4771+
#endif
47724772

47734773
#if PACKETVER_MAIN_NUM >= 20130731 || PACKETVER_RE_NUM >= 20130724 || defined(PACKETVER_ZERO)
47744774
struct PACKET_ZC_USE_SKILL {

src/map/skill.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25079,7 +25079,7 @@ static bool skill_read_autospell_db(const char *filename)
2507925079
count++;
2508025080
}
2508125081

25082-
#if PACKETVER_MAIN_NUM < 20181128 && PACKETVER_RE_NUM < 20181031
25082+
#if PACKETVER_MAIN_NUM < 20181128 && PACKETVER_RE_NUM < 20181031 && PACKETVER_ZERO_NUM < 20180523
2508325083
if (count > 7) {
2508425084
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);
2508525085
ShowWarning("%s: Update your packet version or reduce the number of skills to fix this warning.\n", __func__);

0 commit comments

Comments
 (0)