Bug Fixes:

* Fixed #492, thank @julia40124009
* Fixed #494, thank @Canoe

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
This commit is contained in:
Cydh Ramdh 2015-07-08 09:46:33 +07:00
parent d400533a62
commit 890352a3a0
2 changed files with 3 additions and 3 deletions

View File

@ -5764,7 +5764,7 @@ void clif_displaymessage(const int fd, const char* mes)
/** so we redirect to ZC_NPC_CHAT **/
//clif_colormes(fd, color_table[COLOR_DEFAULT], mes);
unsigned long color = (color_table[COLOR_DEFAULT] & 0x0000FF) << 16 | (color_table[COLOR_DEFAULT] & 0x00FF00) | (color_table[COLOR_DEFAULT] & 0xFF0000) >> 16; // RGB to BGR
unsigned short len = strnlen(mes, 255);
unsigned short len = strnlen(mes, CHAT_SIZE_MAX);
if (len > 0) {
WFIFOHEAD(fd, 13 + len);
@ -5772,7 +5772,7 @@ void clif_displaymessage(const int fd, const char* mes)
WFIFOW(fd, 2) = 13 + len;
WFIFOL(fd, 4) = 0;
WFIFOL(fd, 8) = color;
safestrncpy((char*)WFIFOP(fd, 12), mes, len);
safestrncpy((char*)WFIFOP(fd, 12), mes, len+1);
WFIFOSET(fd, WFIFOW(fd, 2));
}
#else

View File

@ -2877,7 +2877,7 @@ int mob_class_change (struct mob_data *md, int mob_id)
hp_rate = get_percentage(md->status.hp, md->status.max_hp);
md->mob_id = mob_id;
md->db = mobdb;
md->db = mob_db(mob_id);
if (battle_config.override_mob_names==1)
memcpy(md->name,md->db->name,NAME_LENGTH);
else