Skip to content

Commit

Permalink
add missing zero packetver for AUTOSPELL_LIST2 packet
Browse files Browse the repository at this point in the history
  • Loading branch information
guilherme-gm committed May 30, 2024
1 parent 77b8f27 commit 3b74b7b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/map/clif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/map/packets_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/map/skill.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__);
Expand Down

0 comments on commit 3b74b7b

Please sign in to comment.