Corrected some packet structure issues* Resolves

Corrected some packet structure issues
* Resolves a chatting issue while using fake names.
* Resolves an incorrect packet header size for requesting player registries.
Thanks to @wilkemeyer!
This commit is contained in:
Aleos 2016-05-09 09:24:48 -04:00
commit 440c6ef5bb
2 changed files with 3 additions and 1 deletions

View File

@ -10656,11 +10656,13 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd)
// send back message to the speaker
if( is_fake ) {
WFIFOHEAD(fd, textlen + 4);
WFIFOW(fd,0) = 0x8e;
WFIFOW(fd,2) = textlen + 4;
safestrncpy((char*)WFIFOP(fd,4), fakename, textlen);
aFree(fakename);
} else {
WFIFOHEAD(fd, RFIFOW(fd, info->pos[0]));
memcpy(WFIFOP(fd,0), RFIFOP(fd,0), RFIFOW(fd,info->pos[0]));
WFIFOW(fd,0) = 0x8e;
}

View File

@ -479,7 +479,7 @@ int intif_request_registry(struct map_session_data *sd, int flag)
if (CheckForCharServer())
return 0;
WFIFOHEAD(inter_fd,6);
WFIFOHEAD(inter_fd,13);
WFIFOW(inter_fd,0) = 0x3005;
WFIFOL(inter_fd,2) = sd->status.account_id;
WFIFOL(inter_fd,6) = sd->status.char_id;