Bug Fixes:

* Fixed #484,Client Crashing 2014-10-22
This commit is contained in:
icxbb-xx 2015-06-25 14:19:44 +07:00
parent 25dbd6eba4
commit 0dc5aa4c3c

View File

@ -5760,7 +5760,19 @@ void clif_displaymessage(const int fd, const char* mes)
#if PACKETVER == 20141022
/** for some reason game client crashes depending on message pattern (only for this packet) **/
/** so we redirect to ZC_NPC_CHAT **/
clif_colormes(fd, color_table[COLOR_DEFAULT], mes);
//clif_colormes(fd, color_table[COLOR_DEFAULT], mes);
unsigned long color = color_table[COLOR_DEFAULT]; // RGB to BGR
int len = strnlen(mes, 255);
if (len > 0) {
WFIFOHEAD(fd, 13 + len);
WFIFOW(fd, 0) = 0x2C1;
WFIFOW(fd, 2) = 13 + len;
WFIFOL(fd, 4) = 0;
WFIFOL(fd, 8) = color;
safestrncpy((char*)WFIFOP(fd, 12), mes, len + 1);
WFIFOSET(fd, WFIFOW(fd, 2));
}
#else
char *message, *line;