diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-10-31 02:42:59 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-10-31 02:42:59 +0000 |
commit | bfdd943126eb4227723fad000079fb73e1bd18b9 (patch) | |
tree | 6978be01d064b2c42fe2323bedfc3edc165682ec /src/map | |
parent | 3ce90667d6a307bb09abad0f68412f0ab34d46e3 (diff) | |
download | hercules-bfdd943126eb4227723fad000079fb73e1bd18b9.tar.gz hercules-bfdd943126eb4227723fad000079fb73e1bd18b9.tar.bz2 hercules-bfdd943126eb4227723fad000079fb73e1bd18b9.tar.xz hercules-bfdd943126eb4227723fad000079fb73e1bd18b9.zip |
Improved char server packet 0x3087, gave it a variable/dynamic length so that it doesn't waste buffer size with messages too short.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16850 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/intif.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/intif.c b/src/map/intif.c index 2374eaf38..5804bcfba 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -34,7 +34,7 @@ static const int packet_len_table[]={ - -1,-1,27,-1, -1, 0,37, 522, 0, 0, 0, 0, 0, 0, 0, 0, //0x3800-0x380f + -1,-1,27,-1, -1, 0,37,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3800-0x380f 0, 0, 0, 0, 0, 0, 0, 0, -1,11, 0, 0, 0, 0, 0, 0, //0x3810 39,-1,15,15, 14,19, 7,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3820 10,-1,15, 0, 79,19, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830 @@ -2140,15 +2140,15 @@ void intif_request_accinfo( int u_fd, int aid, int group_id, char* query ) { } void intif_parse_MessageToFD(int fd) { - int u_fd = RFIFOL(fd,2); + int u_fd = RFIFOL(fd,4); if( session[u_fd] && session[u_fd]->session_data ) { - int aid = RFIFOL(fd,6); + int aid = RFIFOL(fd,8); struct map_session_data * sd = session[u_fd]->session_data; /* matching e.g. previous fd owner didn't dc during request or is still the same */ if( sd->bl.id == aid ) { char msg[512]; - safestrncpy(msg, (char*)RFIFOP(fd,10), 512); + safestrncpy(msg, (char*)RFIFOP(fd,12), RFIFOW(fd,2) - 12); clif_displaymessage(u_fd,msg); } |