Skip to content
Permalink
Browse files

Sense - show 0 for negatives (#4213)

* Fixes #4212.
* Sense's negative informational stats will now be capped to 0.
Thanks to @flamefury!
  • Loading branch information...
flamefury authored and aleos89 committed Jun 24, 2019
1 parent 34971e5 commit 19835b638bce924b9e8b9d5a71b05d23e68bb26d
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/map/clif.cpp
@@ -5843,7 +5843,7 @@ void clif_skill_estimation(struct map_session_data *sd,struct block_list *dst)
{
struct status_data *status;
unsigned char buf[64];
int i;//, fix;
int i, fix;

nullpo_retv(sd);
nullpo_retv(dst);
@@ -5865,9 +5865,8 @@ void clif_skill_estimation(struct map_session_data *sd,struct block_list *dst)
+(battle_config.estimation_type&2?status->mdef2:0);
WBUFW(buf,18)= status->def_ele;
for(i=0;i<9;i++)
WBUFB(buf,20+i)= (unsigned char)battle_attr_ratio(i+1,status->def_ele, status->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,status->def_ele, status->ele_lv))<0?0:fix);
WBUFB(buf,20+i)= (unsigned char)((fix=battle_attr_ratio(i+1,status->def_ele, status->ele_lv))<0?0:fix);

clif_send(buf,packet_len(0x18c),&sd->bl,sd->status.party_id>0?PARTY_SAMEMAP:SELF);
}

0 comments on commit 19835b6

Please sign in to comment.
You can’t perform that action at this time.