diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-06-15 23:18:04 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-06-15 23:18:04 +0000 |
commit | 54b84a5d7845efe40d3e06a12ac2f2c5ac0137e6 (patch) | |
tree | 2d88dc1e376d1e1a5baa8f595c47e78cb257d713 /src/map/clif.c | |
parent | 1ec9c82750a775daa00c68bcd8c4e28e7e2859a6 (diff) | |
download | hercules-54b84a5d7845efe40d3e06a12ac2f2c5ac0137e6.tar.gz hercules-54b84a5d7845efe40d3e06a12ac2f2c5ac0137e6.tar.bz2 hercules-54b84a5d7845efe40d3e06a12ac2f2c5ac0137e6.tar.xz hercules-54b84a5d7845efe40d3e06a12ac2f2c5ac0137e6.zip |
Fixed bugreport:6035, chars will now start with all stats 1 and 48 status points as for clients 2012 march and beyond.
Did some cleanup at clif.c packet parsing and applied some curly brace love.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16308 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index a8db3a2b8..3ce7ecf5f 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -16114,7 +16114,7 @@ static int clif_parse(int fd) // check authentification packet to know packet version packet_ver = clif_guess_PacketVer(fd, 0, &err); if( err ) {// failed to identify packet version - ShowInfo("clif_parse: Disconnecting session #%d with unknown packet version%s (p:0x%04x|l:%d).\n", fd, ( + ShowInfo("clif_parse: Disconnecting session #%d with unknown packet version%s (p:0x%04x,l:%d).\n", fd, ( err == 1 ? "" : err == 2 ? ", possibly for having an invalid account_id" : err == 3 ? ", possibly for having an invalid char_id." : @@ -16167,12 +16167,10 @@ static int clif_parse(int fd) } if ((int)RFIFOREST(fd) < packet_len) return 0; // not enough data received to form the packet - + if( packet_db[packet_ver][cmd].func == clif_parse_debug ) packet_db[packet_ver][cmd].func(fd, sd); - else - if( packet_db[packet_ver][cmd].func != NULL ) - { + else if( packet_db[packet_ver][cmd].func != NULL ) { if( !sd && packet_db[packet_ver][cmd].func != clif_parse_WantToConnection ) ; //Only valid packet when there is no session else @@ -16185,37 +16183,27 @@ static int clif_parse(int fd) packet_db[packet_ver][cmd].func(fd, sd); } #ifdef DUMP_UNKNOWN_PACKET - else - { + else { const char* packet_txt = "save/packet.txt"; FILE* fp; - if((fp = fopen(packet_txt, "a"))!=NULL) - { - if( sd ) - { + if( ( fp = fopen( packet_txt , "a" ) ) != NULL ) { + if( sd ) { fprintf(fp, "Unknown packet 0x%04X (length %d), %s session #%d, %d/%d (AID/CID)\n", cmd, packet_len, sd->state.active ? "authed" : "unauthed", fd, sd->status.account_id, sd->status.char_id); - } - else - { + } else { fprintf(fp, "Unknown packet 0x%04X (length %d), session #%d\n", cmd, packet_len, fd); } WriteDump(fp, RFIFOP(fd,0), packet_len); fprintf(fp, "\n"); fclose(fp); - } - else - { + } else { ShowError("Failed to write '%s'.\n", packet_txt); // Dump on console instead - if( sd ) - { + if( sd ) { ShowDebug("Unknown packet 0x%04X (length %d), %s session #%d, %d/%d (AID/CID)\n", cmd, packet_len, sd->state.active ? "authed" : "unauthed", fd, sd->status.account_id, sd->status.char_id); - } - else - { + } else { ShowDebug("Unknown packet 0x%04X (length %d), session #%d\n", cmd, packet_len, fd); } @@ -16454,6 +16442,21 @@ static int packetdb_readdb(void) 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + //#0x0880 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + //#0x08C0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + //#0x0900 + 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; struct { void (*func)(int, struct map_session_data *); |