diff options
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index c8cca2aea..179b96c32 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -62,6 +62,7 @@ #include "common/memmgr.h" #include "common/mmo.h" // MAX_CARTS #include "common/nullpo.h" +#include "common/packets.h" #include "common/random.h" #include "common/showmsg.h" #include "common/socket.h" @@ -262,12 +263,15 @@ ACMD(send) if (len) { // show packet length - safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,904), type, clif->packet(type)->len); // Packet 0x%x length: %d + Assert_retr(false, type <= MAX_PACKET_DB && type >= MIN_PACKET_DB); + len = packets->db[type]; + safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd,904), type, len); // Packet 0x%x length: %d clif->message(fd, atcmd_output); return true; } - len = clif->packet(type)->len; + Assert_retr(false, type <= MAX_PACKET_DB && type >= MIN_PACKET_DB); + len = packets->db[type]; if (len == -1) { // dynamic packet @@ -415,7 +419,7 @@ ACMD(send) SKIP_VALUE(message); } - if (clif->packet(type)->len == -1) { // send dynamic packet + if (packets->db[type] == -1) { // send dynamic packet WFIFOW(sd->fd,2)=TOW(off); WFIFOSET(sd->fd,off); } else {// send static packet |