Originally posted by [b]Ind[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4953
affecting whoever uses battle_config.show_mob_inf, in clif_charnameack
CODE
else if( battle_config.show_mob_info )
{
char mobhp[50], *str_p = mobhp;
WBUFW(buf, 0) = cmd = 0x195;
if( battle_config.show_mob_info&4 )
str_p += sprintf(str_p, "Lv. %d | ", md->level);
if( battle_config.show_mob_info&1 )
str_p += sprintf(str_p, "HP: %u/%u | ", md->status.hp, md->status.max_hp);
if( battle_config.show_mob_info&2 )
str_p += sprintf(str_p, "HP: %d%% | ", 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.
memcpy(WBUFP(buf,30), mobhp, NAME_LENGTH);
WBUFB(buf,54) = 0;
memcpy(WBUFP(buf,78), mobhp, NAME_LENGTH);
}
}
78 (at the bottom) is not displayed by the client unless a guild is assigned (when 54 is not null) to the mob (not the case on 100% of the mobs that fall on that check -- guardian_data ones do not fall there).
Results in minimal waste of bandwidth and performance, however its a value worth not wasting on busy servers.
This post has been edited by Ind: Jun 6 2011, 09:51 PM