Hmm I tried adding your patch to the show_mob_info. it works great although if the name of the monster is too long then few characters will be omitted. XD
Clif.cpp
case BL_MOB: {
mob_data *md = (mob_data *)bl;
char ele_name[8] = { 0 };
//char output[16] = { 0 };
if( md->guardian_data && md->guardian_data->guild_id ){
PACKET_ZC_ACK_REQNAMEALL packet = { 0 };
packet.packet_id = HEADER_ZC_ACK_REQNAMEALL;
packet.gid = bl->id;
safestrncpy( packet.name, md->name, NAME_LENGTH );
safestrncpy( packet.guild_name, md->guardian_data->guild_name, NAME_LENGTH );
safestrncpy( packet.position_name, md->guardian_data->castle->castle_name, NAME_LENGTH );
clif_send(&packet, sizeof(packet), src, target);
}else if( battle_config.show_mob_info ){
PACKET_ZC_ACK_REQNAMEALL packet = { 0 };
packet.packet_id = HEADER_ZC_ACK_REQNAMEALL;
packet.gid = bl->id;
safestrncpy( packet.name, md->name, NAME_LENGTH );
char mobhp[50], *str_p = mobhp;
switch (md->status.def_ele) {
case 0: strcpy(ele_name, "Neutral");break;
case 1: strcpy(ele_name, "Water");break;
case 2: strcpy(ele_name, "Earth");break;
case 3: strcpy(ele_name, "Fire");break;
case 4: strcpy(ele_name, "Wind");break;
case 5: strcpy(ele_name, "Poison");break;
case 6: strcpy(ele_name, "Holy");break;
case 7: strcpy(ele_name, "Shadow");break;
case 8: strcpy(ele_name, "Ghost");break;
case 9: strcpy(ele_name, "Undead");break;
default: break;
}
if( battle_config.show_mob_info&4 ){
str_p += sprintf( str_p, "Lv. %d | ", md->level );
}
if( battle_config.show_mob_info&1 ){
if (strlen(ele_name))
str_p += sprintf( str_p, "Ele: %s %d | ", ele_name, md->status.ele_lv);
}
if( battle_config.show_mob_info&2 ){
str_p += sprintf( str_p, "HP: %u%% | ", get_percentage( md->status.hp, md->status.max_hp ) );
}
// Even thought mobhp ain't a name, we send it as one so the client can parse it. [Skotlex]
if( str_p != mobhp ){
*(str_p-3) = '\0'; //Remove trailing space + pipe.
safestrncpy( packet.party_name, mobhp, NAME_LENGTH );
}
clif_send(&packet, sizeof(packet), src, target);
}