summaryrefslogtreecommitdiff
path: root/src/map/packets_struct.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-08-09 00:00:33 +0300
committerAndrei Karas <akaras@inbox.ru>2019-08-21 22:36:41 +0300
commit759cc6382a4d96afe9ff47b3fa13f047e22ea922 (patch)
tree7959ec94ce7af0436b2118d26e9e5fe57034f19b /src/map/packets_struct.h
parent0c200e53ad49bd443bec30504bd760411bf76015 (diff)
downloadhercules-759cc6382a4d96afe9ff47b3fa13f047e22ea922.tar.gz
hercules-759cc6382a4d96afe9ff47b3fa13f047e22ea922.tar.bz2
hercules-759cc6382a4d96afe9ff47b3fa13f047e22ea922.tar.xz
hercules-759cc6382a4d96afe9ff47b3fa13f047e22ea922.zip
Convert ZC_SKILLINFO_LIST into struct. Add new packet version
Diffstat (limited to 'src/map/packets_struct.h')
-rw-r--r--src/map/packets_struct.h32
1 files changed, 27 insertions, 5 deletions
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 8170f13f2..233c6d9c2 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -3533,9 +3533,9 @@ struct PACKET_ZC_HAT_EFFECT {
DEFINE_PACKET_HEADER(ZC_HAT_EFFECT, 0x0a3b);
#endif
+// [4144] this struct updated not in all packets in client
#if PACKETVER_RE_NUM >= 20190807
-struct PACKET_ZC_ADD_SKILL {
- int16 packetType;
+struct SKILLDATA {
uint16 id;
int inf;
uint16 level;
@@ -3544,10 +3544,8 @@ struct PACKET_ZC_ADD_SKILL {
uint8 upFlag;
uint16 level2;
} __attribute__((packed));
-DEFINE_PACKET_HEADER(ZC_ADD_SKILL, 0x0b31);
#else
-struct PACKET_ZC_ADD_SKILL {
- int16 packetType;
+struct SKILLDATA {
uint16 id;
int inf;
uint16 level;
@@ -3556,9 +3554,33 @@ struct PACKET_ZC_ADD_SKILL {
char name[NAME_LENGTH];
uint8 upFlag;
} __attribute__((packed));
+#endif
+
+#if PACKETVER_RE_NUM >= 20190807
+struct PACKET_ZC_ADD_SKILL {
+ int16 packetType;
+ struct SKILLDATA skill;
+} __attribute__((packed));
+DEFINE_PACKET_HEADER(ZC_ADD_SKILL, 0x0b31);
+#else
+struct PACKET_ZC_ADD_SKILL {
+ int16 packetType;
+ struct SKILLDATA skill;
+} __attribute__((packed));
DEFINE_PACKET_HEADER(ZC_ADD_SKILL, 0x0111);
#endif
+struct PACKET_ZC_SKILLINFO_LIST {
+ int16 packetType;
+ int16 packetLength;
+ struct SKILLDATA skills[];
+} __attribute__((packed));
+#if PACKETVER_RE_NUM >= 20190807
+DEFINE_PACKET_HEADER(ZC_SKILLINFO_LIST, 0x0b32);
+#else
+DEFINE_PACKET_HEADER(ZC_SKILLINFO_LIST, 0x010f);
+#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