From 11365498dc26dabc7e9a3b8ffab289c2dd7b3aa3 Mon Sep 17 00:00:00 2001 From: Emistry Haoyan Date: Wed, 2 Oct 2019 20:38:00 +0800 Subject: Update Sense Skill - cap negative value display Enable commented out lines that cap negative values to 0 in the Sense window. Currently the client displays them as 255-fix. [Skotlex] --- src/map/clif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/map/clif.c b/src/map/clif.c index f6caa502e..7456dc351 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5899,7 +5899,7 @@ static void clif_skill_estimation(struct map_session_data *sd, struct block_list { struct status_data *dstatus; unsigned char buf[64]; - int i;//, fix; + int i, fix; nullpo_retv(sd); nullpo_retv(dst); @@ -5921,9 +5921,9 @@ static void clif_skill_estimation(struct map_session_data *sd, struct block_list + ((battle_config.estimation_type&2) ? dstatus->mdef2 : 0); WBUFW(buf,18) = dstatus->def_ele; for(i=0;i<9;i++) { - WBUFB(buf,20+i)= (unsigned char)battle->attr_ratio(i+1,dstatus->def_ele, dstatus->ele_lv); + // WBUFB(buf,20+i)= (unsigned char)battle->attr_ratio(i+1,dstatus->def_ele, dstatus->ele_lv); // The following caps negative attributes to 0 since the client displays them as 255-fix. [Skotlex] - //WBUFB(buf,20+i)= (unsigned char)((fix=battle->attr_ratio(i+1,dstatus->def_ele, dstatus->ele_lv))<0?0:fix); + WBUFB(buf,20+i)= (unsigned char)((fix=battle->attr_ratio(i+1,dstatus->def_ele, dstatus->ele_lv))<0?0:fix); } clif->send(buf,packet_len(0x18c),&sd->bl,sd->status.party_id>0?PARTY_SAMEMAP:SELF); -- cgit v1.2.3-60-g2f50