summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-04-07 01:55:40 -0300
committershennetsind <ind@henn.et>2013-04-07 01:55:40 -0300
commit2f9f7ce4aa46514c9173a3c91f4033b25901520e (patch)
treeec5656a546bcaf6d7820c3de252b63070d32b887 /src/map/atcommand.c
parent10b53b9fbc011a9224d118414517870af3e9e20c (diff)
downloadhercules-2f9f7ce4aa46514c9173a3c91f4033b25901520e.tar.gz
hercules-2f9f7ce4aa46514c9173a3c91f4033b25901520e.tar.bz2
hercules-2f9f7ce4aa46514c9173a3c91f4033b25901520e.tar.xz
hercules-2f9f7ce4aa46514c9173a3c91f4033b25901520e.zip
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 <ind@henn.et>
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c10
1 files changed, 4 insertions, 6 deletions
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);