summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/HPMDataCheck.h3
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/packets_struct.h41
3 files changed, 34 insertions, 12 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index bfd01ec30..2579b0e7d 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -728,7 +728,8 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
{ "PACKET_ZC_PC_PURCHASE_MYITEMLIST", sizeof(struct PACKET_ZC_PC_PURCHASE_MYITEMLIST), SERVER_TYPE_MAP },
{ "PACKET_ZC_PC_PURCHASE_MYITEMLIST_sub", sizeof(struct PACKET_ZC_PC_PURCHASE_MYITEMLIST_sub), SERVER_TYPE_MAP },
{ "PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE", sizeof(struct PACKET_ZC_PRIVATE_AIRSHIP_RESPONSE), SERVER_TYPE_MAP },
- { "PACKET_ZC_PROPERTY_HOMUN", sizeof(struct PACKET_ZC_PROPERTY_HOMUN), SERVER_TYPE_MAP },
+ { "PACKET_ZC_PROPERTY_HOMUN_1", sizeof(struct PACKET_ZC_PROPERTY_HOMUN_1), SERVER_TYPE_MAP },
+ { "PACKET_ZC_PROPERTY_HOMUN_2", sizeof(struct PACKET_ZC_PROPERTY_HOMUN_2), SERVER_TYPE_MAP },
{ "PACKET_ZC_READ_MAIL", sizeof(struct PACKET_ZC_READ_MAIL), SERVER_TYPE_MAP },
{ "PACKET_ZC_REMOVE_EFFECT", sizeof(struct PACKET_ZC_REMOVE_EFFECT), SERVER_TYPE_MAP },
{ "PACKET_ZC_REPAIRITEMLIST", sizeof(struct PACKET_ZC_REPAIRITEMLIST), SERVER_TYPE_MAP },
diff --git a/src/map/clif.c b/src/map/clif.c
index e8780c6ff..28b953de5 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1628,7 +1628,7 @@ static bool clif_spawn(struct block_list *bl)
/// 022e <name>.24B <modified>.B <level>.W <hunger>.W <intimacy>.W <equip id>.W <atk>.W <matk>.W <hit>.W <crit>.W <def>.W <mdef>.W <flee>.W <aspd>.W <hp>.W <max hp>.W <sp>.W <max sp>.W <exp>.L <max exp>.L <skill points>.W <atk range>.W
static void clif_hominfo(struct map_session_data *sd, struct homun_data *hd, int flag)
{
-#if PACKETVER_MAIN_NUM >= 20101005 || PACKETVER_RE_NUM >= 20080827 || defined(PACKETVER_ZERO_NUM)
+#if PACKETVER_MAIN_NUM >= 20101005 || PACKETVER_RE_NUM >= 20080827 || defined(PACKETVER_ZERO)
struct status_data *hstatus;
enum homun_type htype;
struct PACKET_ZC_PROPERTY_HOMUN p;
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index f9b5fab0d..166688a4e 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -1391,9 +1391,9 @@ struct packet_npc_market_result_ack {
} list[MAX_INVENTORY];/* assuming MAX_INVENTORY is max since you can't hold more than MAX_INVENTORY items thus cant buy that many at once. */
} __attribute__((packed));
-#if PACKETVER_MAIN_NUM >= 20131120 || PACKETVER_RE_NUM >= 20131106 || defined(PACKETVER_ZERO)
/* inner struct figured by Ind after some annoying hour of debugging (data Thanks to Yommy) */
struct PACKET_ZC_NPC_MARKET_OPEN_sub {
+#if PACKETVER_MAIN_NUM >= 20131120 || PACKETVER_RE_NUM >= 20131106 || defined(PACKETVER_ZERO)
#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 nameid;
#else
@@ -1403,14 +1403,21 @@ struct PACKET_ZC_NPC_MARKET_OPEN_sub {
uint32 price;
uint32 qty;
uint16 weight;
+#else
+ UNAVAILABLE_STRUCT;
+#endif
} __attribute__((packed));
struct PACKET_ZC_NPC_MARKET_OPEN {
+#if PACKETVER_MAIN_NUM >= 20131120 || PACKETVER_RE_NUM >= 20131106 || defined(PACKETVER_ZERO)
int16 packetType;
int16 packetLength;
struct PACKET_ZC_NPC_MARKET_OPEN_sub list[];
+#else
+ UNAVAILABLE_STRUCT;
+#endif
} __attribute__((packed));
-
+#if PACKETVER_MAIN_NUM >= 20131120 || PACKETVER_RE_NUM >= 20131106 || defined(PACKETVER_ZERO)
DEFINE_PACKET_HEADER(ZC_NPC_MARKET_OPEN, 0x09d5);
#endif
@@ -1791,8 +1798,8 @@ struct PACKET_ZC_GROUP_LIST {
struct PACKET_ZC_GROUP_LIST_SUB members[];
} __attribute__((packed));
-#if PACKETVER_MAIN_NUM >= 20130626 || PACKETVER_RE_NUM >= 20130605 || defined(PACKETVER_ZERO)
struct PACKET_ZC_CLANINFO {
+#if PACKETVER_MAIN_NUM >= 20130626 || PACKETVER_RE_NUM >= 20130605 || defined(PACKETVER_ZERO)
int16 PacketType;
int16 PacketLength;
uint32 ClanID;
@@ -1801,7 +1808,11 @@ struct PACKET_ZC_CLANINFO {
char Map[MAP_NAME_LENGTH_EXT];
uint8 AllyCount;
uint8 AntagonistCount;
+#else
+ UNAVAILABLE_STRUCT;
+#endif
} __attribute__((packed));
+#if PACKETVER_MAIN_NUM >= 20130626 || PACKETVER_RE_NUM >= 20130605 || defined(PACKETVER_ZERO)
DEFINE_PACKET_HEADER(ZC_CLANINFO, 0x098a);
#endif
@@ -2270,9 +2281,8 @@ struct PACKET_ZC_ACK_WEAPONREFINE {
#endif
} __attribute__((packed));
-#if PACKETVER_MAIN_NUM >= 20131230 || PACKETVER_RE_NUM >= 20131230 || defined(PACKETVER_ZERO_NUM)
-// PACKET_ZC_PROPERTY_HOMUN2
-struct PACKET_ZC_PROPERTY_HOMUN {
+struct PACKET_ZC_PROPERTY_HOMUN_2 {
+#if PACKETVER_MAIN_NUM >= 20131230 || PACKETVER_RE_NUM >= 20131230 || defined(PACKETVER_ZERO)
int16 packetType;
char name[NAME_LENGTH];
// Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)
@@ -2301,11 +2311,14 @@ struct PACKET_ZC_PROPERTY_HOMUN {
uint32 expNext;
uint16 skillPoints;
uint16 range;
+#else
+ UNAVAILABLE_STRUCT;
+#endif
} __attribute__((packed));
-DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x09f7);
-#elif PACKETVER_MAIN_NUM >= 20101005 || PACKETVER_RE_NUM >= 20080827 || defined(PACKETVER_ZERO_NUM)
-// PACKET_ZC_PROPERTY_HOMUN1
-struct PACKET_ZC_PROPERTY_HOMUN {
+struct PACKET_ZC_PROPERTY_HOMUN_1 {
+#if PACKETVER_MAIN_NUM >= 20131230 || PACKETVER_RE_NUM >= 20131230 || defined(PACKETVER_ZERO)
+ UNAVAILABLE_STRUCT;
+#elif PACKETVER_MAIN_NUM >= 20101005 || PACKETVER_RE_NUM >= 20080827
int16 packetType;
char name[NAME_LENGTH];
// Bit field, bit 0 : rename_flag (1 = already renamed), bit 1 : homunc vaporized (1 = true), bit 2 : homunc dead (1 = true)
@@ -2334,7 +2347,15 @@ struct PACKET_ZC_PROPERTY_HOMUN {
uint32 expNext;
uint16 skillPoints;
uint16 range;
+#else
+ UNAVAILABLE_STRUCT;
+#endif
} __attribute__((packed));
+#if PACKETVER_MAIN_NUM >= 20131230 || PACKETVER_RE_NUM >= 20131230 || defined(PACKETVER_ZERO)
+#define PACKET_ZC_PROPERTY_HOMUN PACKET_ZC_PROPERTY_HOMUN_2
+DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x09f7);
+#elif PACKETVER_MAIN_NUM >= 20101005 || PACKETVER_RE_NUM >= 20080827
+#define PACKET_ZC_PROPERTY_HOMUN PACKET_ZC_PROPERTY_HOMUN_1
DEFINE_PACKET_HEADER(ZC_PROPERTY_HOMUN, 0x022e);
#endif