summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-12-17 03:47:42 +0300
committerAndrei Karas <akaras@inbox.ru>2018-12-17 03:47:42 +0300
commitfe602eb5dadd9600a1ddc97c124b37036ab028a4 (patch)
treecfd33a2785ff673a73b0992b219273fb2f28240d /src
parent18867f88bf23779a89dbe7d8b7dfcd2cf78744c3 (diff)
downloadhercules-fe602eb5dadd9600a1ddc97c124b37036ab028a4.tar.gz
hercules-fe602eb5dadd9600a1ddc97c124b37036ab028a4.tar.bz2
hercules-fe602eb5dadd9600a1ddc97c124b37036ab028a4.tar.xz
hercules-fe602eb5dadd9600a1ddc97c124b37036ab028a4.zip
Revert "Fix compile errors with old packetvers"
This reverts commit 18867f88bf23779a89dbe7d8b7dfcd2cf78744c3.
Diffstat (limited to 'src')
-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, 12 insertions, 34 deletions
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 2579b0e7d..bfd01ec30 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -728,8 +728,7 @@ 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_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_PROPERTY_HOMUN", sizeof(struct PACKET_ZC_PROPERTY_HOMUN), 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 28b953de5..e8780c6ff 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)
+#if PACKETVER_MAIN_NUM >= 20101005 || PACKETVER_RE_NUM >= 20080827 || defined(PACKETVER_ZERO_NUM)
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 166688a4e..f9b5fab0d 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,21 +1403,14 @@ 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
@@ -1798,8 +1791,8 @@ struct PACKET_ZC_GROUP_LIST {
struct PACKET_ZC_GROUP_LIST_SUB members[];
} __attribute__((packed));
-struct PACKET_ZC_CLANINFO {
#if PACKETVER_MAIN_NUM >= 20130626 || PACKETVER_RE_NUM >= 20130605 || defined(PACKETVER_ZERO)
+struct PACKET_ZC_CLANINFO {
int16 PacketType;
int16 PacketLength;
uint32 ClanID;
@@ -1808,11 +1801,7 @@ 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
@@ -2281,8 +2270,9 @@ struct PACKET_ZC_ACK_WEAPONREFINE {
#endif
} __attribute__((packed));
-struct PACKET_ZC_PROPERTY_HOMUN_2 {
-#if PACKETVER_MAIN_NUM >= 20131230 || PACKETVER_RE_NUM >= 20131230 || defined(PACKETVER_ZERO)
+#if PACKETVER_MAIN_NUM >= 20131230 || PACKETVER_RE_NUM >= 20131230 || defined(PACKETVER_ZERO_NUM)
+// PACKET_ZC_PROPERTY_HOMUN2
+struct PACKET_ZC_PROPERTY_HOMUN {
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)
@@ -2311,14 +2301,11 @@ struct PACKET_ZC_PROPERTY_HOMUN_2 {
uint32 expNext;
uint16 skillPoints;
uint16 range;
-#else
- UNAVAILABLE_STRUCT;
-#endif
} __attribute__((packed));
-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
+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 {
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)
@@ -2347,15 +2334,7 @@ struct PACKET_ZC_PROPERTY_HOMUN_1 {
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