diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-01-29 16:02:57 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-01-29 16:02:57 +0000 |
commit | 49d458f73eb18df9ba960e2e8a60db81fa638044 (patch) | |
tree | 34d8d4492eb33abb0a5f962dd0761420677d11e9 | |
parent | e1b078f81273298d23cce7da3261feefb035f0ce (diff) | |
download | hercules-49d458f73eb18df9ba960e2e8a60db81fa638044.tar.gz hercules-49d458f73eb18df9ba960e2e8a60db81fa638044.tar.bz2 hercules-49d458f73eb18df9ba960e2e8a60db81fa638044.tar.xz hercules-49d458f73eb18df9ba960e2e8a60db81fa638044.zip |
Added a nasty hack to prevent multilanguage clients from breaking guild notices
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9737 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/map/clif.c | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index db8bf9051..9c8d45b60 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,6 +3,8 @@ 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/01/29 + * Added a nasty hack to prevent multilanguage clients from breaking guild notices 2007/01/27 * Made @reloadscript wipe ALL previous mobs that the script engine spawned - this way it is manageable via global vars; the other way doesn't allow that diff --git a/src/map/clif.c b/src/map/clif.c index fe0c5a1f6..f10f1a043 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10545,6 +10545,18 @@ void clif_parse_GuildChangeNotice(int fd,struct map_session_data *sd) { if(!sd->state.gmaster_flag) return; + // compensate for the client's double marker bug (in both strings) + if ((RFIFOB(fd, 6) == '|') && (RFIFOB(fd, 6+3) == '|')) { + memmove(RFIFOP(fd, 6+3), RFIFOP(fd, 6+6), 60-6); memset(RFIFOP(fd, 60-3), 0x00, 3); // drop the duplicate marker + } + if ((RFIFOB(fd, 66) == '|') && (RFIFOB(fd, 66+3) == '|')) { + memmove(RFIFOP(fd, 66+3), RFIFOP(fd, 66+6), 180-6); memset(RFIFOP(fd, 180-3), 0x00, 3); // drop the duplicate marker + } + // compensate for the client's adding of an extra space at the end of the message + if (RFIFOB(fd, 66) == '|') { + memset(RFIFOP(fd, 66 + strnlen(RFIFOP(fd, 66), 120)-1), 0x00, 1); // delete extra space at the end + } + guild_change_notice(sd,RFIFOL(fd,2),(char*)RFIFOP(fd,6),(char*)RFIFOP(fd,66)); } |