summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/clif.c4
-rw-r--r--src/map/packets.h2
-rw-r--r--src/map/packets_struct.h6
-rw-r--r--src/map/script.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index eba2ddce3..d41570640 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -22227,7 +22227,7 @@ static bool clif_enchant_equipment(struct map_session_data *sd, enum equip_pos p
static void clif_npc_barter_open(struct map_session_data *sd, struct npc_data *nd)
{
-#if PACKETVER_ZERO_NUM >= 20181226
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
nullpo_retv(sd);
nullpo_retv(nd);
struct npc_item_list *shop = nd->u.scr.shop->item;
@@ -22263,7 +22263,7 @@ static void clif_npc_barter_open(struct map_session_data *sd, struct npc_data *n
static void clif_parse_NPCBarterPurchase(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
static void clif_parse_NPCBarterPurchase(int fd, struct map_session_data *sd)
{
-#if PACKETVER_ZERO_NUM >= 20181226
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
const struct PACKET_CZ_NPC_BARTER_PURCHASE *p = RP2PTR(fd);
int count = (p->packetLength - sizeof(struct PACKET_CZ_NPC_BARTER_PURCHASE)) / sizeof p->list[0];
struct barteritemlist item_list;
diff --git a/src/map/packets.h b/src/map/packets.h
index 44a49b387..d430a6de8 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -1922,7 +1922,7 @@ packet(0x96e,clif->ackmergeitems);
packet(0x0b19,clif->pInventoryExpansionRejected);
#endif
-#if PACKETVER_ZERO_NUM >= 20181226
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
packet(0x0b0f,clif->pNPCBarterPurchase);
packet(0x0b12,clif->pNPCBarterClosed);
#endif
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index d20b20bee..534da6378 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -3056,7 +3056,7 @@ struct PACKET_CZ_PARTY_CONFIG {
} __attribute__((packed));
DEFINE_PACKET_HEADER(CZ_PARTY_CONFIG, 0x02c8);
-#if PACKETVER_ZERO_NUM >= 20181226
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
struct PACKET_ZC_NPC_BARTER_OPEN_sub {
#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 nameid;
@@ -3084,14 +3084,14 @@ struct PACKET_ZC_NPC_BARTER_OPEN {
DEFINE_PACKET_HEADER(ZC_NPC_BARTER_OPEN, 0x0b0e);
#endif
-#if PACKETVER_ZERO_NUM >= 20181226
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
struct PACKET_CZ_NPC_BARTER_CLOSE {
int16 packetType;
} __attribute__((packed));
DEFINE_PACKET_HEADER(CZ_NPC_BARTER_CLOSE, 0x0b12);
#endif
-#if PACKETVER_ZERO_NUM >= 20181226
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
struct PACKET_CZ_NPC_BARTER_PURCHASE_sub {
#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
uint32 itemId;
diff --git a/src/map/script.c b/src/map/script.c
index be591a3ae..76d15d8f1 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -24175,9 +24175,9 @@ static BUILDIN(tradertype)
script->reportsrc(st);
}
#endif
-#if PACKETVER_ZERO_NUM < 20181226
+#if PACKETVER_MAIN_NUM < 20190116 && PACKETVER_RE_NUM < 20190116 && PACKETVER_ZERO_NUM < 20181226
if (type == NST_BARTER) {
- ShowWarning("buildin_tradertype: NST_BARTER is only available with PACKETVER_ZERO_NUM 20181226 or newer!\n");
+ ShowWarning("buildin_tradertype: NST_BARTER is only available with PACKETVER_ZERO_NUM 20181226 or PACKETVER_MAIN_NUM 20190116 or PACKETVER_RE_NUM 20190116 or newer!\n");
script->reportsrc(st);
}
#endif