From 2f9f7ce4aa46514c9173a3c91f4033b25901520e Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 7 Apr 2013 01:55:40 -0300 Subject: PacketDB Overhaul Feature Design by GreenBox Special Thanks to mkbu95 for bringing this topic up! (packet db) http://hercules.ws/board/topic/353-packetdb-overhaul/ Signed-off-by: shennetsind --- src/map/atcommand.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 7fc998628..9dccef177 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -258,12 +258,12 @@ ACMD_FUNC(send) if(len) {// show packet length - sprintf(atcmd_output, msg_txt(904), type, packet_db[sd->packet_ver][type].len); // Packet 0x%x length: %d + sprintf(atcmd_output, msg_txt(904), type, packet_db[type].len); // Packet 0x%x length: %d clif->message(fd, atcmd_output); return 0; } - len=packet_db[sd->packet_ver][type].len; + len=packet_db[type].len; off=2; if(len == 0) {// unknown packet - ERROR @@ -414,12 +414,10 @@ ACMD_FUNC(send) SKIP_VALUE(message); } - if(packet_db[sd->packet_ver][type].len == -1) - {// send dynamic packet + if(packet_db[type].len == -1) {// send dynamic packet WFIFOW(fd,2)=TOW(off); WFIFOSET(fd,off); - } else - {// send static packet + } else {// send static packet if(off < len) memset(WFIFOP(fd,off),0,len-off); WFIFOSET(fd,len); -- cgit v1.2.3-60-g2f50