diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 9 | ||||
-rw-r--r-- | src/map/clif.h | 1 | ||||
-rw-r--r-- | src/map/packets.h | 4 | ||||
-rw-r--r-- | src/map/packets_struct.h | 8 |
4 files changed, 22 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 44635d699..ae92e7b2c 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -22289,6 +22289,14 @@ static void clif_parse_NPCBarterPurchase(int fd, struct map_session_data *sd) #endif } +static void clif_parse_clientVersion(int fd, struct map_session_data *sd) __attribute__((nonnull (2))); +static void clif_parse_clientVersion(int fd, struct map_session_data *sd) +{ +#if PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_RE_NUM >= 20090408 || PACKETVER_SAK_NUM >= 20090408 || defined(PACKETVER_ZERO) + // TODO: show or store client version +#endif +} + /*========================================== * Main client packet processing function *------------------------------------------*/ @@ -23478,4 +23486,5 @@ void clif_defaults(void) clif->npc_barter_open = clif_npc_barter_open; clif->pNPCBarterClosed = clif_parse_NPCBarterClosed; clif->pNPCBarterPurchase = clif_parse_NPCBarterPurchase; + clif->pClientVersion = clif_parse_clientVersion; } diff --git a/src/map/clif.h b/src/map/clif.h index 1aee11c33..36c360cbc 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -1599,6 +1599,7 @@ struct clif_interface { void (*npc_barter_open) (struct map_session_data *sd, struct npc_data *nd); void (*pNPCBarterClosed) (int fd, struct map_session_data *sd); void (*pNPCBarterPurchase) (int fd, struct map_session_data *sd); + void (*pClientVersion) (int fd, struct map_session_data *sd); }; #ifdef HERCULES_CORE diff --git a/src/map/packets.h b/src/map/packets.h index d430a6de8..50784f09a 100644 --- a/src/map/packets.h +++ b/src/map/packets.h @@ -649,6 +649,10 @@ packet(0x96e,clif->ackmergeitems); packet(0x0439,clif->pUseItem,2,4); #endif +#if PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_RE_NUM >= 20090408 || PACKETVER_SAK_NUM >= 20090408 || defined(PACKETVER_ZERO) + packet(0x044a,clif->pClientVersion); +#endif + // 2009-05-20aRagexe, 2009-05-20aRagexeRE #if PACKETVER >= 20090520 // new packets diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index 9ebc8a75e..2339935ec 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -3152,6 +3152,14 @@ struct PACKET_ZC_USESKILL_ACK { DEFINE_PACKET_HEADER(ZC_USESKILL_ACK, 0x013e); #endif +#if PACKETVER_MAIN_NUM >= 20090406 || PACKETVER_RE_NUM >= 20090408 || PACKETVER_SAK_NUM >= 20090408 || defined(PACKETVER_ZERO) +struct PACKET_CZ_CLIENT_VERSION { + int16 packetType; + uint32 clientVersion; +} __attribute__((packed)); +DEFINE_PACKET_HEADER(CZ_CLIENT_VERSION, 0x044a); +#endif + #if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute #pragma pack(pop) #endif // not NetBSD < 6 / Solaris |