Skip to content

Commit

Permalink
Add missing import of packetsmacro in packet definition headers
Browse files Browse the repository at this point in the history
Without this header, HPMHookGen would sometimes generated
incomplete/invalid results due to not being able to properly expand
macros such as DEFINE_PACKET_ID
  • Loading branch information
guilherme-gm committed Aug 31, 2024
1 parent 38bb5cf commit 3913b51
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/char/packets_hc_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "common/hercules.h"
#include "common/mmo.h"
#include "common/packetsstatic_len.h"
#include "common/packetsmacro.h"

/* Packets Structs */
#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
Expand Down
2 changes: 2 additions & 0 deletions src/common/HPMDataCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_CHARMAP_AGENCY_JOIN_PARTY", sizeof(struct PACKET_CHARMAP_AGENCY_JOIN_PARTY), SERVER_TYPE_ALL },
{ "PACKET_CHARMAP_GUILD_EMBLEM", sizeof(struct PACKET_CHARMAP_GUILD_EMBLEM), SERVER_TYPE_ALL },
{ "PACKET_CHARMAP_GUILD_INFO", sizeof(struct PACKET_CHARMAP_GUILD_INFO), SERVER_TYPE_ALL },
{ "PACKET_CHARMAP_GUILD_INFO_EMBLEM", sizeof(struct PACKET_CHARMAP_GUILD_INFO_EMBLEM), SERVER_TYPE_ALL },
{ "PACKET_CHARMAP_GUILD_INFO_EMPTY", sizeof(struct PACKET_CHARMAP_GUILD_INFO_EMPTY), SERVER_TYPE_ALL },
#else
#define COMMON_CHARMAPPACKETS_H
#endif // COMMON_CHARMAPPACKETS_H
Expand Down
1 change: 1 addition & 0 deletions src/common/charmappackets.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#define COMMON_CHARMAPPACKETS_H

#include "common/hercules.h"
#include "common/packetsmacro.h"

/* Packets Structs */
#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
Expand Down
1 change: 1 addition & 0 deletions src/map/packets_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "common/cbasetypes.h"
#include "common/mmo.h"
#include "common/packetsstatic_len.h"
#include "common/packetsmacro.h"

// Packet DB
#define MAX_PACKET_POS 20
Expand Down

0 comments on commit 3913b51

Please sign in to comment.