i make it work show hp sp and party status
but i change it to #rank_level why it show Lv.0 but i level 2
and teleport name party remove
void clif_charnameupdate (struct map_session_data *ssd)
{
unsigned char buf[103];
char tmp[30]; // Mod: HP/SP
int cmd = 0x195, ps = -1;
struct party_data *p = NULL;
struct guild *g = NULL;
nullpo_retv(ssd);
if( ssd->fakename[0] )
return; //No need to update as the party/guild was not displayed anyway.
WBUFW(buf,0) = cmd;
WBUFL(buf,2) = ssd->bl.id;
memcpy(WBUFP(buf,6), ssd->status.name, NAME_LENGTH);
if (!battle_config.display_party_name) {
if (ssd->status.party_id > 0 && ssd->status.guild_id > 0 && (g = ssd->guild) != NULL)
p = party_search(ssd->status.party_id);
}else{
if (ssd->status.party_id > 0)
p = party_search(ssd->status.party_id);
}
if( ssd->status.guild_id > 0 && (g = ssd->guild) != NULL )
{
int i;
ARR_FIND(0, g->max_member, i, g->member[i].account_id == ssd->status.account_id && g->member[i].char_id == ssd->status.char_id);
if( i < g->max_member ) ps = g->member[i].position;
}
//sprintf(tmp, "HP:%d%%,SP:%d%%,Party:", ssd->battle_status.hp*100/ssd->battle_status.max_hp, ssd->battle_status.sp*100/ssd->battle_status.max_sp);
sprintf(tmp, "Synergy Lv. :%d%%,SP:%d%%,Party:", pc_readglobalreg_str(ssd,"#rank_level"), ssd->battle_status.sp*100/ssd->battle_status.max_sp);
if( p )
//memcpy(WBUFP(buf,30), p->party.name, NAME_LENGTH);
strcat(tmp,"Yes");
else
//WBUFB(buf,30) = 0;
strcat(tmp,"No");
memcpy(WBUFP(buf,30), tmp, NAME_LENGTH);
if( g && ps >= 0 && ps < MAX_GUILDPOSITION )
{
memcpy(WBUFP(buf,54), g->name,NAME_LENGTH);
memcpy(WBUFP(buf,78), g->position[ps].name, NAME_LENGTH);
}
else
{
WBUFB(buf,54) = 0;
WBUFB(buf,78) = 0;
}
// Update nearby clients
clif_send(buf, packet_len(cmd), &ssd->bl, AREA);
}