From 2bae2bca114fbdc11aa40e27bec5b7c79e93eea8 Mon Sep 17 00:00:00 2001 From: ultramage Date: Thu, 22 Nov 2007 00:16:37 +0000 Subject: * Modified mapserver login procedure to make clients from may 2007 and newer not crash when entering mapserver (bugreport:468) - this changes PACKETVER to 8, causing incompatibility with old clients - this makes the "Login" hex obsolete; please stop using it as it causes a conflict with this update and may have negative sideeffects git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11776 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 6 ++++++ src/map/clif.c | 17 +++++++++++++---- src/map/clif.h | 3 ++- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index bc4f504c9..e0efb0e0e 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,6 +3,12 @@ Date Added AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. +2007/11/22 + * Modified mapserver login procedure to make clients from may 2007 + and newer not crash when entering mapserver (bugreport:468) [ultramage] + - this changes PACKETVER to 8, causing incompatibility with old clients + - this makes the "Login" hex obsolete; please stop using it as it + causes a conflict with this update and may have negative sideeffects 2007/11/21 * Fixed Sql_SetEncoding not setting the encoding of the connection properly. (fixes bugreport:30) diff --git a/src/map/clif.c b/src/map/clif.c index 1c0a0b6ac..0e1d11e35 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7180,8 +7180,8 @@ int clif_refresh(struct map_session_data *sd) clif_cartlist(sd); clif_updatestatus(sd,SP_CARTINFO); } - clif_updatestatus(sd,SP_MAXWEIGHT); clif_updatestatus(sd,SP_WEIGHT); + clif_updatestatus(sd,SP_MAXWEIGHT); clif_updatestatus(sd,SP_STR); clif_updatestatus(sd,SP_AGI); clif_updatestatus(sd,SP_VIT); @@ -7772,9 +7772,18 @@ void clif_parse_WantToConnection(int fd, TBL_PC* sd) session[fd]->session_data = sd; pc_setnewpc(sd, account_id, char_id, login_id1, client_tick, sex, fd); + +#if PACKETVER < 8 WFIFOHEAD(fd,4); WFIFOL(fd,0) = sd->bl.id; WFIFOSET(fd,4); +#else + WFIFOHEAD(fd,packet_len(0x283)); + WFIFOW(fd,0) = 0x283; + WFIFOL(fd,2) = sd->bl.id; + WFIFOSET(fd,packet_len(0x283)); +#endif + chrif_authreq(sd); return; } @@ -7823,9 +7832,9 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) clif_updatestatus(sd,SP_CARTINFO); } - // weight max, now - clif_updatestatus(sd,SP_MAXWEIGHT); + // weight clif_updatestatus(sd,SP_WEIGHT); + clif_updatestatus(sd,SP_MAXWEIGHT); // guild // (needs to go before clif_spawn() to show guild emblems correctly) @@ -11847,7 +11856,7 @@ static int packetdb_readdb(void) 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //#0x0280 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 18, 0, 0, 0, 0, 0, + 0, 0, 0, 6, 0, 0, 0, 0, 0, 8, 18, 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,191, 0, 0, 0, 0, 0, 0, diff --git a/src/map/clif.h b/src/map/clif.h index 6f3d0f016..dedd2745e 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -27,8 +27,9 @@ struct guild; // server->client protocol version // v7 - 2005-04-11aSakexe+ - 0x229, 0x22a, 0x22b, 0x22c +// v8 - 2007-05-21aSakexe+ - 0x283 #ifndef PACKETVER - #define PACKETVER 7 + #define PACKETVER 8 #endif // packet DB -- cgit v1.2.3-60-g2f50