diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-11-07 19:05:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-11-15 01:40:30 +0300 |
commit | a9d3bb3365d4a14f72b216db49001ccb2b42d4d0 (patch) | |
tree | 8ecfd00b4e080c01c9a9e675b7964444962abf43 /src/map/clif.c | |
parent | b43fc8c44bc3990e52493018860612b1a96b5f16 (diff) | |
download | hercules-a9d3bb3365d4a14f72b216db49001ccb2b42d4d0.tar.gz hercules-a9d3bb3365d4a14f72b216db49001ccb2b42d4d0.tar.bz2 hercules-a9d3bb3365d4a14f72b216db49001ccb2b42d4d0.tar.xz hercules-a9d3bb3365d4a14f72b216db49001ccb2b42d4d0.zip |
Remove packet len field from packet macro and packet functions.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index e1909b438..19e90237f 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -22150,7 +22150,7 @@ static const struct s_packet_db *clif_packet(int packet_id) return &packet_db[packet_id]; } -static void __attribute__ ((unused)) packetdb_addpacket(short cmd, int len, ...) +static void __attribute__ ((unused)) packetdb_addpacket(int cmd, ...) { va_list va; int i; @@ -22167,21 +22167,19 @@ static void __attribute__ ((unused)) packetdb_addpacket(short cmd, int len, ...) return; } -// packet_db[cmd].len = len; - - va_start(va,len); + va_start(va, cmd); pos = va_arg(va, int); va_end(va); - if( pos == 0xFFFF ) { /* nothing more to do */ + if (pos == 0xFFFF) { /* nothing more to do */ return; } - va_start(va,len); + va_start(va, cmd); - func = va_arg(va,pFunc); + func = va_arg(va, pFunc); packet_db[cmd].func = func; @@ -22200,7 +22198,7 @@ static void packetdb_loaddb(void) { memset(packet_db,0,sizeof(packet_db)); -#define packet(id, size, ...) packetdb_addpacket((id), (size), ##__VA_ARGS__, 0xFFFF) +#define packet(id, ...) packetdb_addpacket((id), ##__VA_ARGS__, 0xFFFF) #include "map/packets.h" /* load structure data */ #ifdef PACKETVER_ZERO #include "map/packets_shuffle_zero.h" |