summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2009-05-17 18:24:17 +0000
committerFate <fate-tmw@googlemail.com>2009-05-17 18:24:17 +0000
commit12560ec2f654339cfd6f219b2c0403ff683be19d (patch)
treee81c654ece5f257d7eee1ba8acf41f2b8b8a639c
parentfdf3fa3479ff9ee122d246092f7ca51a60fd4691 (diff)
downloadtmwa-12560ec2f654339cfd6f219b2c0403ff683be19d.tar.gz
tmwa-12560ec2f654339cfd6f219b2c0403ff683be19d.tar.bz2
tmwa-12560ec2f654339cfd6f219b2c0403ff683be19d.tar.xz
tmwa-12560ec2f654339cfd6f219b2c0403ff683be19d.zip
Transform underscores that preceed NPC names into blanks before sending to clients
-rw-r--r--src/map/clif.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index ba9f6a5..ed973fd 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -6428,10 +6428,15 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) {
case BL_NPC:
memcpy(WFIFOP(fd,6), ((struct npc_data*)bl)->name, 24);
{
- char *end = strchr(WFIFOP(fd, 6), '#'); // elim hashed out/invisible names for the client
+ char *start = WFIFOP(fd, 6);
+ char *end = strchr(start, '#'); // [fate] elim hashed out/invisible names for the client
if (end)
while (*end)
*end++ = 0;
+
+ // [fate] Elim preceding underscores for (hackish) name position fine-tuning
+ while (*start == '_')
+ *start++ = ' ';
}
WFIFOSET(fd,packet_len_table[0x95]);
break;